Trait microkelvin::Compound [−][src]
pub trait Compound<A, S>: Sized + Archive {
type Leaf: Archive;
fn child(&self, ofs: usize) -> Child<'_, Self, A, S>
where
S: Store;
fn child_mut(&mut self, ofs: usize) -> ChildMut<'_, Self, A, S>
where
S: Store;
fn walk<'a, W>(&'a self, walker: W) -> Option<Branch<'a, Self, A, S>>
where
S: Store,
Self::Archived: ArchivedCompound<Self, A, S>,
Self::Leaf: Archive,
A: Annotation<Self::Leaf>,
W: Walker<Self, A, S>,
{ ... }
fn walk_mut<'a, W>(
&'a mut self,
walker: W
) -> Option<BranchMut<'a, Self, A, S>>
where
S: Store,
Self: Clone,
Self::Archived: ArchivedCompound<Self, A, S> + Deserialize<Self, S>,
Self::Leaf: Archive,
A: Annotation<Self::Leaf>,
W: Walker<Self, A, S>,
{ ... }
}
Expand description
A type that can recursively contain itself and leaves.
Associated Types
Required methods
Get a reference to a child
Provided methods
Constructs a branch from this root compound
fn walk_mut<'a, W>(&'a mut self, walker: W) -> Option<BranchMut<'a, Self, A, S>> where
S: Store,
Self: Clone,
Self::Archived: ArchivedCompound<Self, A, S> + Deserialize<Self, S>,
Self::Leaf: Archive,
A: Annotation<Self::Leaf>,
W: Walker<Self, A, S>,
fn walk_mut<'a, W>(&'a mut self, walker: W) -> Option<BranchMut<'a, Self, A, S>> where
S: Store,
Self: Clone,
Self::Archived: ArchivedCompound<Self, A, S> + Deserialize<Self, S>,
Self::Leaf: Archive,
A: Annotation<Self::Leaf>,
W: Walker<Self, A, S>,
Constructs a mutable branch from this root compound