Trait microkelvin::Compound
source · [−]pub trait Compound<A>: Canon {
type Leaf: Canon;
fn child(&self, ofs: usize) -> Child<'_, Self, A>;
fn child_mut(&mut self, ofs: usize) -> ChildMut<'_, Self, A>;
fn annotations(&self) -> AnnoIter<'_, Self, A>ⓘNotable traits for AnnoIter<'a, C, A>impl<'a, C, A> Iterator for AnnoIter<'a, C, A> where
C: Compound<A>,
A: Annotation<C::Leaf> + 'a, type Item = WrappedAnnotation<'a, C, A>;
where
A: Annotation<Self::Leaf>,
{ ... }
fn from_generic(_tree: &GenericTree) -> Result<Self, CanonError>
where
Self::Leaf: Canon,
A: Canon,
{ ... }
}
Expand description
A type that can recursively contain itself and leaves.
Associated Types
Required methods
Returns a reference to a possible child at specified offset
Provided methods
fn annotations(&self) -> AnnoIter<'_, Self, A>ⓘNotable traits for AnnoIter<'a, C, A>impl<'a, C, A> Iterator for AnnoIter<'a, C, A> where
C: Compound<A>,
A: Annotation<C::Leaf> + 'a, type Item = WrappedAnnotation<'a, C, A>;
where
A: Annotation<Self::Leaf>,
fn annotations(&self) -> AnnoIter<'_, Self, A>ⓘNotable traits for AnnoIter<'a, C, A>impl<'a, C, A> Iterator for AnnoIter<'a, C, A> where
C: Compound<A>,
A: Annotation<C::Leaf> + 'a, type Item = WrappedAnnotation<'a, C, A>;
where
A: Annotation<Self::Leaf>,
C: Compound<A>,
A: Annotation<C::Leaf> + 'a, type Item = WrappedAnnotation<'a, C, A>;
Provides an iterator over all sub-annotations of the compound node
fn from_generic(_tree: &GenericTree) -> Result<Self, CanonError> where
Self::Leaf: Canon,
A: Canon,
fn from_generic(_tree: &GenericTree) -> Result<Self, CanonError> where
Self::Leaf: Canon,
A: Canon,
Construct a specific compound tree from a generic tree