dashmap

Trait Map

Source
pub trait Map<'a, K: 'a + Eq + Hash, V: 'a, S: 'a + Clone + BuildHasher> {
Show 29 methods // Required methods fn _shard_count(&self) -> usize; unsafe fn _get_read_shard( &'a self, i: usize, ) -> &'a RawTable<(K, SharedValue<V>)>; unsafe fn _yield_read_shard( &'a self, i: usize, ) -> RwLockReadGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>; unsafe fn _yield_write_shard( &'a self, i: usize, ) -> RwLockWriteGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>; unsafe fn _try_yield_read_shard( &'a self, i: usize, ) -> Option<RwLockReadGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>>; unsafe fn _try_yield_write_shard( &'a self, i: usize, ) -> Option<RwLockWriteGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>>; fn _insert(&self, key: K, value: V) -> Option<V>; fn _remove<Q>(&self, key: &Q) -> Option<(K, V)> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _remove_if<Q>( &self, key: &Q, f: impl FnOnce(&K, &V) -> bool, ) -> Option<(K, V)> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _remove_if_mut<Q>( &self, key: &Q, f: impl FnOnce(&K, &mut V) -> bool, ) -> Option<(K, V)> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _iter(&'a self) -> Iter<'a, K, V, S, Self> where Self: Sized; fn _iter_mut(&'a self) -> IterMut<'a, K, V, S, Self> where Self: Sized; fn _get<Q>(&'a self, key: &Q) -> Option<Ref<'a, K, V>> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _get_mut<Q>(&'a self, key: &Q) -> Option<RefMut<'a, K, V>> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _try_get<Q>(&'a self, key: &Q) -> TryResult<Ref<'a, K, V>> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _try_get_mut<Q>(&'a self, key: &Q) -> TryResult<RefMut<'a, K, V>> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _shrink_to_fit(&self); fn _retain(&self, f: impl FnMut(&K, &mut V) -> bool); fn _len(&self) -> usize; fn _capacity(&self) -> usize; fn _alter<Q>(&self, key: &Q, f: impl FnOnce(&K, V) -> V) where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _alter_all(&self, f: impl FnMut(&K, V) -> V); fn _view<Q, R>(&self, key: &Q, f: impl FnOnce(&K, &V) -> R) -> Option<R> where K: Borrow<Q>, Q: Hash + Eq + ?Sized; fn _entry(&'a self, key: K) -> Entry<'a, K, V>; fn _try_entry(&'a self, key: K) -> Option<Entry<'a, K, V>>; fn _hasher(&self) -> S; // Provided methods fn _clear(&self) { ... } fn _contains_key<Q>(&'a self, key: &Q) -> bool where K: Borrow<Q>, Q: Hash + Eq + ?Sized { ... } fn _is_empty(&self) -> bool { ... }
}
Expand description

Implementation detail that is exposed due to generic constraints in public types.

Required Methods§

Source

fn _shard_count(&self) -> usize

Source

unsafe fn _get_read_shard( &'a self, i: usize, ) -> &'a RawTable<(K, SharedValue<V>)>

§Safety

The index must not be out of bounds.

Source

unsafe fn _yield_read_shard( &'a self, i: usize, ) -> RwLockReadGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>

§Safety

The index must not be out of bounds.

Source

unsafe fn _yield_write_shard( &'a self, i: usize, ) -> RwLockWriteGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>

§Safety

The index must not be out of bounds.

Source

unsafe fn _try_yield_read_shard( &'a self, i: usize, ) -> Option<RwLockReadGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>>

§Safety

The index must not be out of bounds.

Source

unsafe fn _try_yield_write_shard( &'a self, i: usize, ) -> Option<RwLockWriteGuard<'a, RawRwLock, RawTable<(K, SharedValue<V>)>>>

§Safety

The index must not be out of bounds.

Source

fn _insert(&self, key: K, value: V) -> Option<V>

Source

fn _remove<Q>(&self, key: &Q) -> Option<(K, V)>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _remove_if<Q>( &self, key: &Q, f: impl FnOnce(&K, &V) -> bool, ) -> Option<(K, V)>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _remove_if_mut<Q>( &self, key: &Q, f: impl FnOnce(&K, &mut V) -> bool, ) -> Option<(K, V)>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _iter(&'a self) -> Iter<'a, K, V, S, Self>
where Self: Sized,

Source

fn _iter_mut(&'a self) -> IterMut<'a, K, V, S, Self>
where Self: Sized,

Source

fn _get<Q>(&'a self, key: &Q) -> Option<Ref<'a, K, V>>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _get_mut<Q>(&'a self, key: &Q) -> Option<RefMut<'a, K, V>>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _try_get<Q>(&'a self, key: &Q) -> TryResult<Ref<'a, K, V>>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _try_get_mut<Q>(&'a self, key: &Q) -> TryResult<RefMut<'a, K, V>>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _shrink_to_fit(&self)

Source

fn _retain(&self, f: impl FnMut(&K, &mut V) -> bool)

Source

fn _len(&self) -> usize

Source

fn _capacity(&self) -> usize

Source

fn _alter<Q>(&self, key: &Q, f: impl FnOnce(&K, V) -> V)
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _alter_all(&self, f: impl FnMut(&K, V) -> V)

Source

fn _view<Q, R>(&self, key: &Q, f: impl FnOnce(&K, &V) -> R) -> Option<R>
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _entry(&'a self, key: K) -> Entry<'a, K, V>

Source

fn _try_entry(&'a self, key: K) -> Option<Entry<'a, K, V>>

Source

fn _hasher(&self) -> S

Provided Methods§

Source

fn _clear(&self)

Source

fn _contains_key<Q>(&'a self, key: &Q) -> bool
where K: Borrow<Q>, Q: Hash + Eq + ?Sized,

Source

fn _is_empty(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, K: 'a + Eq + Hash, V: 'a, S: 'a + BuildHasher + Clone> Map<'a, K, V, S> for DashMap<K, V, S>