[][src]Struct logmap::LoanMap

pub struct LoanMap<K, V> where
    K: PartialEq + Hash
{ /* fields omitted */ }

Methods

impl<K, V> LoanMap<K, V> where
    K: PartialEq + Hash
[src]

pub fn new() -> LoanMap<K, V>[src]

Allocates a new LoanMap with the default number of buckets

pub fn with_capacity(cap: usize, bucket_size: usize) -> LoanMap<K, V>[src]

Allocates a new LoanMap with cap buckets Take great care to allocate enough buckets since resizing the map is very costly

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

pub fn contains(&self, key: &K) -> bool[src]

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

pub fn upsert<F>(&self, key: K, f: F) -> Option<V> where
    F: FnOnce(&V) -> V, 
[src]

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

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

Auto Trait Implementations

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

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

impl<K, V> Sync for LoanMap<K, V> where
    K: Send + Sync,
    V: Send + Sync

impl<K, V> UnwindSafe for LoanMap<K, V>

impl<K, V> RefUnwindSafe for LoanMap<K, V>

Blanket Implementations

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

impl<T> From<T> for 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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]