Query

Trait Query 

Source
pub trait Query<B: BTreeTrait> {
    type QueryArg: Clone;

    // Required methods
    fn init(target: &Self::QueryArg) -> Self;
    fn find_node(
        &mut self,
        target: &Self::QueryArg,
        child_caches: &[Child<B>],
    ) -> FindResult;
    fn confirm_elem(
        &mut self,
        q: &Self::QueryArg,
        elem: &B::Elem,
    ) -> (usize, bool);
}

Required Associated Types§

Required Methods§

Source

fn init(target: &Self::QueryArg) -> Self

Source

fn find_node( &mut self, target: &Self::QueryArg, child_caches: &[Child<B>], ) -> FindResult

Source

fn confirm_elem(&mut self, q: &Self::QueryArg, elem: &B::Elem) -> (usize, bool)

Confirm the search result and returns (offset, found)

If elem is not target, found=false

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§