pub trait AvltrieeSearch<T, I, A>: AsRef<Avltriee<T, I, A>>
where A: AvltrieeAllocator<T>, I: ?Sized,
{ // Required methods fn cmp(left: &I, right: &I) -> Ordering; fn invert<'a>(&'a self, value: &'a T) -> &'a I; // Provided methods fn edge(&self, value: &I) -> (Option<NonZero<u32>>, Ordering) { ... } fn row(&self, value: &I) -> Option<NonZero<u32>> { ... } 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(left: &I, right: &I) -> Ordering

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

Provided Methods§

fn edge(&self, value: &I) -> (Option<NonZero<u32>>, Ordering)

Finds the edge of a node from the specified value.

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

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.

Object Safety§

This trait is not object safe.

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>,