[][src]Struct boomphf::hashmap::NoKeyBoomHashMap

pub struct NoKeyBoomHashMap<K, D1> {
    pub mphf: Mphf<K>,
    pub values: Vec<D1>,
}

A HashMap data structure where the mapping between keys and values is encoded in a Mphf. Keys are not stored - this can greatly improve the memory consumption, but can only be used if you can guarantee that you will only query for keys that were in the original set. Querying for a new key will return a random value, silently.

Fields

mphf: Mphf<K>values: Vec<D1>

Implementations

impl<K, D1> NoKeyBoomHashMap<K, D1> where
    K: Hash + Debug + PartialEq + Send + Sync,
    D1: Debug
[src]

pub fn new_parallel(
    mut keys: Vec<K>,
    mut values: Vec<D1>
) -> NoKeyBoomHashMap<K, D1>
[src]

pub fn new_with_mphf(mphf: Mphf<K>, values: Vec<D1>) -> NoKeyBoomHashMap<K, D1>[src]

pub fn get<Q: ?Sized>(&self, kmer: &Q) -> Option<&D1> where
    K: Borrow<Q>,
    Q: Hash + Eq
[src]

Get the value associated with key, if available, otherwise return None

Trait Implementations

impl<K: Debug, D1: Debug> Debug for NoKeyBoomHashMap<K, D1>[src]

Auto Trait Implementations

impl<K, D1> RefUnwindSafe for NoKeyBoomHashMap<K, D1> where
    D1: RefUnwindSafe,
    K: RefUnwindSafe
[src]

impl<K, D1> Send for NoKeyBoomHashMap<K, D1> where
    D1: Send,
    K: Send
[src]

impl<K, D1> Sync for NoKeyBoomHashMap<K, D1> where
    D1: Sync,
    K: Sync
[src]

impl<K, D1> Unpin for NoKeyBoomHashMap<K, D1> where
    D1: Unpin,
    K: Unpin
[src]

impl<K, D1> UnwindSafe for NoKeyBoomHashMap<K, D1> where
    D1: UnwindSafe,
    K: UnwindSafe
[src]

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> Pointable for T

type Init = T

The type for initializers.

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.