pub trait Compound<A>: Sized {
    type Leaf;

    fn child(&self, index: usize) -> Child<'_, Self, A>;
    fn child_mut(&mut self, index: usize) -> ChildMut<'_, Self, A>;
}
Expand description

A type that can recursively contain itself and leaves.

Required Associated Types

The leaf type of the compound collection

Required Methods

Returns a reference to a possible child at specified index

Returns a mutable reference to a possible child at specified index

Implementors