pub trait AvltrieeSearch<T, I, A>: AsRef<Avltriee<T, I, A>>
where A: AvltrieeAllocator<T>, I: ?Sized,
{ // Required methods fn cmp(&self, left: &T, right: &I) -> Ordering; fn invert<'a, 'b>(&'a self, value: &'b T) -> &'a I where 'b: 'a; // Provided methods fn search(&self, value: &I) -> Found where Self: Sized { ... } fn row(&self, value: &I) -> Option<NonZero<u32>> where Self: Sized { ... } fn value<'a>(&'a self, row: NonZero<u32>) -> Option<&'a I> where A: 'a, T: 'a { ... } unsafe fn value_unchecked<'a>(&'a self, row: NonZero<u32>) -> &'a I where A: 'a, T: 'a { ... } }

Required Methods§

fn cmp(&self, left: &T, right: &I) -> Ordering

fn invert<'a, 'b>(&'a self, value: &'b T) -> &'a I
where 'b: 'a,

Provided Methods§

fn search(&self, value: &I) -> Found
where Self: Sized,

Finds the edge of a node from the specified value.

fn row(&self, value: &I) -> Option<NonZero<u32>>
where Self: Sized,

Search row of a value.

fn value<'a>(&'a self, row: NonZero<u32>) -> Option<&'a I>
where A: 'a, T: 'a,

Returns the value of the specified row. Returns None if the row does not exist.

unsafe fn value_unchecked<'a>(&'a self, row: NonZero<u32>) -> &'a I
where A: 'a, T: 'a,

Returns the value of the specified row.

Implementors§

source§

impl AvltrieeSearch<DataAddress, [u8], IdxFileAllocator<DataAddress>> for IdxBinary

§

impl<T, A> AvltrieeSearch<T, T, A> for Avltriee<T, T, A>
where T: Ord + Clone, A: AvltrieeAllocator<T>,