[][src]Enum rustc_ap_rustc_data_structures::mini_map::MiniMap

pub enum MiniMap<K, V> {
    Array(ArrayVec<[(K, V); 8]>),
    Map(FxHashMap<K, V>),
}

Small-storage-optimized implementation of a map made specifically for caching results.

Stores elements in a small array up to a certain length and switches to HashMap when that length is exceeded.

Variants

Array(ArrayVec<[(K, V); 8]>)
Map(FxHashMap<K, V>)

Implementations

impl<K: Eq + Hash, V> MiniMap<K, V>[src]

pub fn new() -> Self[src]

Creates an empty MiniMap.

pub fn insert(&mut self, key: K, value: V)[src]

Inserts or updates value in the map.

pub fn get(&self, key: &K) -> Option<&V>[src]

Return value by key if any.

Auto Trait Implementations

impl<K, V> RefUnwindSafe for MiniMap<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for MiniMap<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for MiniMap<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for MiniMap<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for MiniMap<K, V> where
    K: UnwindSafe,
    V: 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<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]

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

impl<T> Instrument 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,