Enum shortcut::idx::Index [−][src]
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]
fn lookup<'a>(&'a self, key: &T) -> Box<dyn Iterator<Item = usize> + 'a>
[src]
fn index(&mut self, key: T, row: usize)
[src]
fn undex(&mut self, key: &T, row: usize)
[src]
fn estimate(&self) -> usize
[src]
impl<T: Ord + Eq + 'static + Send + Sync> From<BTreeIndex<T>> for Index<T>
[src]
fn from(x: BTreeIndex<T>) -> 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,