pub trait Map<'a, K: 'a + Eq + Hash, V: 'a, S: 'a + Clone + BuildHasher> {
Show 29 methods
fn _shard_count(&self) -> usize;
unsafe fn _get_read_shard(
&'a self,
i: usize
) -> &'a HashMap<K, SharedValue<V>, S>;
unsafe fn _yield_read_shard(
&'a self,
i: usize
) -> RwLockReadGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>;
unsafe fn _yield_write_shard(
&'a self,
i: usize
) -> RwLockWriteGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>;
unsafe fn _try_yield_read_shard(
&'a self,
i: usize
) -> Option<RwLockReadGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>>;
unsafe fn _try_yield_write_shard(
&'a self,
i: usize
) -> Option<RwLockWriteGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>>;
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>ⓘNotable traits for Iter<'a, K, V, S, M>impl<'a, K: Eq + Hash, V, S: 'a + BuildHasher + Clone, M: Map<'a, K, V, S>> Iterator for Iter<'a, K, V, S, M> type Item = RefMulti<'a, K, V, S>;
where
Self: Sized;
fn _iter_mut(&'a self) -> IterMut<'a, K, V, S, Self>ⓘNotable traits for IterMut<'a, K, V, S, M>impl<'a, K: Eq + Hash, V, S: 'a + BuildHasher + Clone, M: Map<'a, K, V, S>> Iterator for IterMut<'a, K, V, S, M> type Item = RefMutMulti<'a, K, V, S>;
where
Self: Sized;
fn _get<Q>(&'a self, key: &Q) -> Option<Ref<'a, K, V, S>>
where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized;
fn _get_mut<Q>(&'a self, key: &Q) -> Option<RefMut<'a, K, V, S>>
where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized;
fn _try_get<Q>(&'a self, key: &Q) -> TryResult<Ref<'a, K, V, S>>
where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized;
fn _try_get_mut<Q>(&'a self, key: &Q) -> TryResult<RefMut<'a, K, V, S>>
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, S>;
fn _try_entry(&'a self, key: K) -> Option<Entry<'a, K, V, S>>;
fn _hasher(&self) -> S;
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
sourceunsafe fn _get_read_shard(
&'a self,
i: usize
) -> &'a HashMap<K, SharedValue<V>, S>
unsafe fn _get_read_shard(
&'a self,
i: usize
) -> &'a HashMap<K, SharedValue<V>, S>
Safety
The index must not be out of bounds.
sourceunsafe fn _yield_read_shard(
&'a self,
i: usize
) -> RwLockReadGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>
unsafe fn _yield_read_shard(
&'a self,
i: usize
) -> RwLockReadGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>
Safety
The index must not be out of bounds.
sourceunsafe fn _yield_write_shard(
&'a self,
i: usize
) -> RwLockWriteGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>
unsafe fn _yield_write_shard(
&'a self,
i: usize
) -> RwLockWriteGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>
Safety
The index must not be out of bounds.
sourceunsafe fn _try_yield_read_shard(
&'a self,
i: usize
) -> Option<RwLockReadGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>>
unsafe fn _try_yield_read_shard(
&'a self,
i: usize
) -> Option<RwLockReadGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>>
Safety
The index must not be out of bounds.
sourceunsafe fn _try_yield_write_shard(
&'a self,
i: usize
) -> Option<RwLockWriteGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>>
unsafe fn _try_yield_write_shard(
&'a self,
i: usize
) -> Option<RwLockWriteGuard<'a, RawRwLock, HashMap<K, SharedValue<V>, S>>>
Safety
The index must not be out of bounds.
sourcefn _remove_if<Q>(&self, key: &Q, f: impl FnOnce(&K, &V) -> bool) -> Option<(K, V)>where
fn _remove_if<Q>(&self, key: &Q, f: impl FnOnce(&K, &V) -> bool) -> Option<(K, V)>where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized,
sourcefn _remove_if_mut<Q>(
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,
sourcefn _iter(&'a self) -> Iter<'a, K, V, S, Self>ⓘNotable traits for Iter<'a, K, V, S, M>
fn _iter(&'a self) -> Iter<'a, K, V, S, Self>ⓘNotable traits for Iter<'a, K, V, S, M>impl<'a, K: Eq + Hash, V, S: 'a + BuildHasher + Clone, M: Map<'a, K, V, S>> Iterator for Iter<'a, K, V, S, M> type Item = RefMulti<'a, K, V, S>;
where
Self: Sized,
sourcefn _iter_mut(&'a self) -> IterMut<'a, K, V, S, Self>ⓘNotable traits for IterMut<'a, K, V, S, M>
fn _iter_mut(&'a self) -> IterMut<'a, K, V, S, Self>ⓘNotable traits for IterMut<'a, K, V, S, M>impl<'a, K: Eq + Hash, V, S: 'a + BuildHasher + Clone, M: Map<'a, K, V, S>> Iterator for IterMut<'a, K, V, S, M> type Item = RefMutMulti<'a, K, V, S>;
where
Self: Sized,
sourcefn _get<Q>(&'a self, key: &Q) -> Option<Ref<'a, K, V, S>>where
fn _get<Q>(&'a self, key: &Q) -> Option<Ref<'a, K, V, S>>where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized,
sourcefn _get_mut<Q>(&'a self, key: &Q) -> Option<RefMut<'a, K, V, S>>where
fn _get_mut<Q>(&'a self, key: &Q) -> Option<RefMut<'a, K, V, S>>where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized,
sourcefn _try_get<Q>(&'a self, key: &Q) -> TryResult<Ref<'a, K, V, S>>where
fn _try_get<Q>(&'a self, key: &Q) -> TryResult<Ref<'a, K, V, S>>where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized,
sourcefn _try_get_mut<Q>(&'a self, key: &Q) -> TryResult<RefMut<'a, K, V, S>>where
fn _try_get_mut<Q>(&'a self, key: &Q) -> TryResult<RefMut<'a, K, V, S>>where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized,
source
fn _shrink_to_fit(&self)
sourcefn _alter<Q>(&self, key: &Q, f: impl FnOnce(&K, V) -> V)where
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)
sourcefn _view<Q, R>(&self, key: &Q, f: impl FnOnce(&K, &V) -> R) -> Option<R>where
fn _view<Q, R>(&self, key: &Q, f: impl FnOnce(&K, &V) -> R) -> Option<R>where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized,
source