Trait iodyn::raz_meta::RazMeta [] [src]

pub trait RazMeta<E>: Sized + Debug + Clone + Eq + Hash {
    type Index: FirstLast;
    fn from_none(lev: u32, n: Option<Name>) -> Self;
    fn from_vec(vec: &Vec<E>, lev: u32, n: Option<Name>) -> Self;
    fn from_meta(l: &Self, r: &Self, lev: u32, n: Option<Name>) -> Self;
    fn navigate(
        l: &Self,
        r: &Self,
        index: &Self::Index
    ) -> Navigation<Self::Index>; fn split_vec<'a>(vec: &'a Vec<E>, index: &Self::Index) -> (&'a [E], &'a [E]); }

trait for creating and searching for meta data in the branches of the raz.

There are two pieces of meta data in each node, one created from its left branch and one created from its right branch. The level and name from the current node are also available.

Associated Types

Required Methods

create meta data for an empty branch

The names passed into here are USED in the tree that it rebuilds the meta data for, and should not be used again to name arts

create meta data from a leaf vec

The names passed into here are USED in the tree that it rebuilds the meta data for, and should not be used again to name arts

create meta data from the pair of meta data in branches

Each branch contains a pair of meta data, so if this fn is being used to create left meta data, it will receive the left and right pair from the left branch, along with the current level and name. This is similar for creating the right meta data.

The names passed into here are USED in the tree that it rebuilds the meta data for, and should not be used again to name arts

choose a branch and create an adjusted index for that branch

splits a vec into slices based on the index

Implementors