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