Skip to main content

Proximity

Enum Proximity 

Source
pub enum Proximity<'t, K, V> {
    Exact(Iter<'t, K, V>),
    Between(Iter<'t, K, V>),
    Smaller(Iter<'t, K, V>),
    Larger(Iter<'t, K, V>),
    Empty,
}
Expand description

Proximity of the Iter to the key passed to TreeIndex::locate.

Variants§

§

Exact(Iter<'t, K, V>)

Iter that points to the exact key.

Iter::get returns the exact key.

§

Between(Iter<'t, K, V>)

Iter that points to the closest smaller key and the closest larger key.

Iter::get returns the closest smaller key, and Iter::get_back returns the closest larger key.

§

Smaller(Iter<'t, K, V>)

Iter that points to the closest smaller key.

The TreeIndex does not contain any larger keys than the specified key, and Iter::get_back returns the closest smaller key.

§

Larger(Iter<'t, K, V>)

Iter that points to the closest larger key.

The TreeIndex does not contain any smaller keys than the specified key, and Iter::get returns the closest larger key.

§

Empty

The TreeIndex is empty.

Trait Implementations§

Source§

impl<K, V> Debug for Proximity<'_, K, V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'t, K, V> !RefUnwindSafe for Proximity<'t, K, V>

§

impl<'t, K, V> !Send for Proximity<'t, K, V>

§

impl<'t, K, V> !Sync for Proximity<'t, K, V>

§

impl<'t, K, V> Freeze for Proximity<'t, K, V>

§

impl<'t, K, V> Unpin for Proximity<'t, K, V>

§

impl<'t, K, V> UnsafeUnpin for Proximity<'t, K, V>

§

impl<'t, K, V> UnwindSafe for Proximity<'t, K, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.