[−][src]Struct logmap::LoanMap
Methods
impl<K, V> LoanMap<K, V> where
K: PartialEq + Hash,
[src]
K: PartialEq + Hash,
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]
F: FnOnce(&V) -> V,
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,
K: Send,
V: Send,
impl<K, V> Unpin for LoanMap<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> Sync for LoanMap<K, V> where
K: Send + Sync,
V: Send + Sync,
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]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,