pub struct AppendOnlyHashMap<K, V>(/* private fields */);Expand description
Like std::collections::HashMap, but append-only.
Implementations§
Source§impl<K, V> AppendOnlyHashMap<K, V>
impl<K, V> AppendOnlyHashMap<K, V>
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates an empty AppendOnlyHashMap with the specified capacity.
Source§impl<K, V> AppendOnlyHashMap<K, V>
impl<K, V> AppendOnlyHashMap<K, V>
Sourcepub fn get<'map, Q>(&'map self, key: &Q) -> Option<&'map V>
pub fn get<'map, Q>(&'map self, key: &Q) -> Option<&'map V>
Returns a reference to the value corresponding to the key.
Sourcepub fn get_or_insert_with<'map, F>(&'map self, key: K, f: F) -> &'map V
pub fn get_or_insert_with<'map, F>(&'map self, key: K, f: F) -> &'map V
Returns a reference to the value corresponding to the key, invoking the provided callback if it is not already present.
Trait Implementations§
Auto Trait Implementations§
impl<K, V> !Freeze for AppendOnlyHashMap<K, V>
impl<K, V> RefUnwindSafe for AppendOnlyHashMap<K, V>
impl<K, V> Send for AppendOnlyHashMap<K, V>
impl<K, V> Sync for AppendOnlyHashMap<K, V>
impl<K, V> Unpin for AppendOnlyHashMap<K, V>where
K: Unpin,
impl<K, V> UnwindSafe for AppendOnlyHashMap<K, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more