pub struct Shard<K, V, S = RandomState> { /* private fields */ }
Expand description
A single shard in the map
Implementations
sourceimpl<K, V> Shard<K, V>
impl<K, V> Shard<K, V>
sourcepub fn remove(&mut self, key: WriteKey<K>) -> Option<V> where
K: Hash + Eq,
pub fn remove(&mut self, key: WriteKey<K>) -> Option<V> where
K: Hash + Eq,
Remove the key, returning the value at that position if it existed
sourcepub fn get_mut<Q: Key<K>>(&mut self, key: Q) -> Option<&mut V> where
K: Hash + Eq,
pub fn get_mut<Q: Key<K>>(&mut self, key: Q) -> Option<&mut V> where
K: Hash + Eq,
Get mutable value for the provided key
Trait Implementations
Auto Trait Implementations
impl<K, V, S> RefUnwindSafe for Shard<K, V, S> where
K: RefUnwindSafe,
S: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V, S> Send for Shard<K, V, S> where
K: Send,
S: Send,
V: Send,
impl<K, V, S> Sync for Shard<K, V, S> where
K: Sync,
S: Sync,
V: Sync,
impl<K, V, S> Unpin for Shard<K, V, S> where
K: Unpin,
S: Unpin,
V: Unpin,
impl<K, V, S> UnwindSafe for Shard<K, V, S> where
K: UnwindSafe,
S: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more