pub struct HamtMap<K, V, IS = ShareStore<K, V>, H = DefaultHasher> { /* private fields */ }
Implementations§
Source§impl<K, V, IS, H> HamtMap<K, V, IS, H>
impl<K, V, IS, H> HamtMap<K, V, IS, H>
pub fn new() -> HamtMap<K, V, IS, H>
pub fn iter<'a>(&'a self) -> HamtMapIterator<'a, K, V, IS, H> ⓘ
pub fn find<'a>(&'a self, key: &K) -> Option<&'a V>
pub fn len(&self) -> usize
Sourcepub fn insert(self, key: K, value: V) -> (HamtMap<K, V, IS, H>, bool)
pub fn insert(self, key: K, value: V) -> (HamtMap<K, V, IS, H>, bool)
Inserts a key-value pair into the map. An existing value for a key is replaced by the new value. The first tuple element of the return value is the new map instance representing the map after the insertion. The second tuple element is true if the size of the map was changed by the operation and false otherwise.
Sourcepub fn remove(self, key: &K) -> (HamtMap<K, V, IS, H>, bool)
pub fn remove(self, key: &K) -> (HamtMap<K, V, IS, H>, bool)
Removes a key-value pair from the map. The first tuple element of the return value is the new map instance representing the map after the insertion. The second tuple element is true if the size of the map was changed by the operation and false otherwise.
Trait Implementations§
Source§impl<K, V, IS, H> FromIterator<(K, V)> for HamtMap<K, V, IS, H>
impl<K, V, IS, H> FromIterator<(K, V)> for HamtMap<K, V, IS, H>
Source§impl<'a, K, V, IS, H> IntoIterator for &'a HamtMap<K, V, IS, H>
impl<'a, K, V, IS, H> IntoIterator for &'a HamtMap<K, V, IS, H>
Source§impl<K, V, IS, H> PartialEq for HamtMap<K, V, IS, H>
impl<K, V, IS, H> PartialEq for HamtMap<K, V, IS, H>
impl<K, V, IS, H> Eq for HamtMap<K, V, IS, H>
Auto Trait Implementations§
impl<K, V, IS, H> Freeze for HamtMap<K, V, IS, H>
impl<K, V, IS, H> RefUnwindSafe for HamtMap<K, V, IS, H>
impl<K, V, IS = ShareStore<K, V>, H = DefaultHasher> !Send for HamtMap<K, V, IS, H>
impl<K, V, IS = ShareStore<K, V>, H = DefaultHasher> !Sync for HamtMap<K, V, IS, H>
impl<K, V, IS, H> Unpin for HamtMap<K, V, IS, H>
impl<K, V, IS, H> UnwindSafe for HamtMap<K, V, IS, H>
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