Enum shortcut::idx::Index[][src]

pub enum Index<T> {
    Range(Box<dyn RangeIndex<T> + Send + Sync>),
    Equality(Box<dyn EqualityIndex<T> + Send + Sync>),
}

A sum type expressing all different types of indices so they can easily be stored. Since all indices must at least implement EqualityIndex, this enum also forwards all calls of that trait to the underlying index for convenience.

Variants

Range(Box<dyn RangeIndex<T> + Send + Sync>)

A RangeIndex trait object.

Equality(Box<dyn EqualityIndex<T> + Send + Sync>)

An EqualityIndex trait object.

Trait Implementations

impl<T> EqualityIndex<T> for Index<T>[src]

impl<T: Ord + Eq + 'static + Send + Sync> From<BTreeIndex<T>> for Index<T>[src]

impl<T: Eq + Hash + 'static + Send + Sync> From<HashIndex<T>> for Index<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Index<T>

impl<T> Send for Index<T>

impl<T> Sync for Index<T>

impl<T> Unpin for Index<T>

impl<T> !UnwindSafe for Index<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.