Trait grove::trees::SomeTreeRef[][src]

pub trait SomeTreeRef<D: Data> {
    type Walker: SomeWalker<D>;
    fn walker(self) -> Self::Walker;

    fn search<L>(self, locator: L) -> Self::Walker
    where
        L: Locator<D>,
        Self: Sized
, { ... } }
Expand description

This is a workaround for not having Generic Associated Types in Rust yet. Really, the type Self::Walker should have been defined in SomeTree and should have been generic in a lifetime parameter.

Associated Types

The walker type associated with this tree. for example, if Self = &'a AVLTreee<D> then Self::Walker = AVLWalker<'a>. The walker’s lifetime comes from Self’s lifetime.

Required methods

Creates a walker for the given tree.

Provided methods

Finds any node that the locator Accepts. If there isn’t any, it finds the empty location where that node would be instead. Returns a walker at the wanted position.

Implementors