[][src]Struct ironsea_index_hashmap::Index

pub struct Index<R, K> where
    K: Clone + Eq + Hash + PartialEq + Ord
{ /* fields omitted */ }

Implementation of ironsea_index::Indexed.

The index is backed by a std::collections::HashMap.

An ordered std::vec::Vec of keys is maintained, in order to satisfy range queries.

Methods

impl<K, R> Index<R, K> where
    R: Record<K>,
    K: Clone + Eq + Hash + PartialEq + Ord
[src]

pub fn new<I>(iter: I) -> Self where
    I: Iterator<Item = R>, 
[src]

Creates a new Index from the provided iterator.

pub fn keys(&self) -> &Vec<K>[src]

Return an ordered list of all keys contained in the index.

Trait Implementations

impl<R: Clone, K: Clone> Clone for Index<R, K> where
    K: Clone + Eq + Hash + PartialEq + Ord
[src]

impl<R: Debug, K: Debug> Debug for Index<R, K> where
    K: Clone + Eq + Hash + PartialEq + Ord
[src]

impl<'de, R, K> Deserialize<'de> for Index<R, K> where
    K: Clone + Eq + Hash + PartialEq + Ord,
    R: Deserialize<'de>,
    K: Deserialize<'de>, 
[src]

impl<K, R> Indexed<R, K> for Index<R, K> where
    R: Record<K>,
    K: Clone + Eq + Hash + PartialEq + Ord
[src]

impl<R, K> Serialize for Index<R, K> where
    K: Clone + Eq + Hash + PartialEq + Ord,
    R: Serialize,
    K: Serialize
[src]

Auto Trait Implementations

impl<R, K> RefUnwindSafe for Index<R, K> where
    K: RefUnwindSafe,
    R: RefUnwindSafe

impl<R, K> Send for Index<R, K> where
    K: Send,
    R: Send

impl<R, K> Sync for Index<R, K> where
    K: Sync,
    R: Sync

impl<R, K> Unpin for Index<R, K> where
    K: Unpin,
    R: Unpin

impl<R, K> UnwindSafe for Index<R, K> where
    K: UnwindSafe,
    R: UnwindSafe

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.