MentionableTop docs

This commit is contained in:
AF 2023-07-30 17:31:07 +00:00
parent c9287c97d4
commit db41cd220f
2 changed files with 3 additions and 2 deletions

View File

@ -51,7 +51,7 @@ pub use self::slice_deserializer::SliceDeserializer;
/// Helper alias for [`WeakFunctor::F`] of [`FunctorContext::T`]. /// Helper alias for [`WeakFunctor::F`] of [`FunctorContext::T`].
pub type Wrapped<'a, Ctx, A> = WrapC<'a, A, Ctx>; pub type Wrapped<'a, Ctx, A> = WrapC<'a, A, Ctx>;
/// Base for [`Mentionable`]. /// [Mentionable] base.
pub trait MentionableBase<'a, Ctx: Context<'a>>: 'a + Serializable + Sized { pub trait MentionableBase<'a, Ctx: Context<'a>>: 'a + Serializable + Sized {
/// Type of the associated factory. /// Type of the associated factory.
type Fctr: FactoryBase<'a, Ctx, Mtbl = Self>; type Fctr: FactoryBase<'a, Ctx, Mtbl = Self>;
@ -60,6 +60,7 @@ pub trait MentionableBase<'a, Ctx: Context<'a>>: 'a + Serializable + Sized {
fn factory(&self) -> Self::Fctr; fn factory(&self) -> Self::Fctr;
} }
/// Topological [Mentionable]. Allows iterating over [Point]s it references, if any;
pub trait MentionableTop<'a, Ctx: Context<'a>>: 'a { pub trait MentionableTop<'a, Ctx: Context<'a>>: 'a {
/// See implementation for the definition. /// See implementation for the definition.
/// Hash of all the references' points concatenated, ordered, non-unique. /// Hash of all the references' points concatenated, ordered, non-unique.

View File

@ -24,7 +24,7 @@ pub type AParseError<A> = <A as AtomicBase>::AParseError;
pub type AParseResult<A> = Result<A, AParseError<A>>; pub type AParseResult<A> = Result<A, AParseError<A>>;
/// Base for [`Atomic`]. /// [`Atomic`] base.
pub trait AtomicBase: 'static + Send + Sync + Send + Clone + Serializable { pub trait AtomicBase: 'static + Send + Sync + Send + Clone + Serializable {
/// Equivalent of [`FactoryBase::ParseError`]. /// Equivalent of [`FactoryBase::ParseError`].
type AParseError: Error; type AParseError: Error;