Enum shortcut::idx::Index

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

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§

Return an iterator that yields the indices of all rows that match the given value.
Add the given row index to the index under the given value.
Remove the given row index under the given value from the index.
Give the expected number of rows returned for a key. This method may be called often, and in rapid succession, and so should return quickly. Read more
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.