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.

Required Associated Types

The leaf type of the Compound collection

Required Methods

Get a reference to a child

Get a mutable reference to a child

Provided Methods

Constructs a branch from this root compound

Constructs a mutable branch from this root compound

Implementors