pub enum ArcTrick<K, V> {
ArcTrick(Arc<Hamt<K, V, ArcTrick<K, V>>>),
}
Variants§
Methods from Deref<Target = Hamt<K, V, ArcTrick<K, V>>>§
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn keys(&self) -> Keys<'_, K, V, HamtRef> ⓘ
pub fn keys(&self) -> Keys<'_, K, V, HamtRef> ⓘ
Returns an iterator that visits every key in an unspecified order.
Sourcepub fn values(&self) -> Values<'_, K, V, HamtRef> ⓘ
pub fn values(&self) -> Values<'_, K, V, HamtRef> ⓘ
Returns an iterator that visits every value in an unspecified order.
Sourcepub fn get<Q>(&self, k: &Q) -> Option<&V>
pub fn get<Q>(&self, k: &Q) -> Option<&V>
Returns a reference to the value corresponding to the given key, or None if there is no value associated with the key.
Sourcepub fn contains_key<Q>(&self, k: &Q) -> bool
pub fn contains_key<Q>(&self, k: &Q) -> bool
Returns true if the map contains the given key.
pub fn insert<Q, R>(&self, k: &Q, v: &R) -> Self
Sourcepub fn remove<Q>(&self, k: &Q) -> Self
pub fn remove<Q>(&self, k: &Q) -> Self
Returns a new map without an entry corresponding to the given key.
Sourcepub fn adjust<F, Q>(&self, key: &Q, f: F) -> Self
pub fn adjust<F, Q>(&self, key: &Q, f: F) -> Self
Modifies the value tied to the given key with the function f
. Otherwise, the map returned
is identical.
Trait Implementations§
impl<K: Eq, V: Eq> Eq for ArcTrick<K, V>
impl<K, V> StructuralPartialEq for ArcTrick<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for ArcTrick<K, V>
impl<K, V> RefUnwindSafe for ArcTrick<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for ArcTrick<K, V>
impl<K, V> Sync for ArcTrick<K, V>
impl<K, V> Unpin for ArcTrick<K, V>
impl<K, V> UnwindSafe for ArcTrick<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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