Struct dashmap::ReadOnlyView [−][src]
A read-only view into a DashMap
. Allows to obtain raw references to the stored values.
Implementations
impl<K, V, S> ReadOnlyView<K, V, S>
[src][−]
pub fn into_inner(self) -> DashMap<K, V, S>
[src][−]
Consumes this ReadOnlyView
, returning the underlying DashMap
.
impl<'a, K: 'a + Eq + Hash, V: 'a, S: BuildHasher + Clone> ReadOnlyView<K, V, S>
[src][−]
pub fn len(&self) -> usize
[src][−]
Returns the number of elements in the map.
pub fn is_empty(&self) -> bool
[src][−]
Returns true
if the map contains no elements.
pub fn capacity(&self) -> usize
[src][−]
Returns the number of elements the map can hold without reallocating.
pub fn contains_key<Q: ?Sized>(&'a self, key: &Q) -> bool where
K: Borrow<Q>,
Q: Hash + Eq,
[src][−]
K: Borrow<Q>,
Q: Hash + Eq,
Returns true
if the map contains a value for the specified key.
pub fn get<Q: ?Sized>(&'a self, key: &Q) -> Option<&'a V> where
K: Borrow<Q>,
Q: Hash + Eq,
[src][−]
K: Borrow<Q>,
Q: Hash + Eq,
Returns a reference to the value corresponding to the key.
pub fn get_key_value<Q: ?Sized>(&'a self, key: &Q) -> Option<(&'a K, &'a V)> where
K: Borrow<Q>,
Q: Hash + Eq,
[src][−]
K: Borrow<Q>,
Q: Hash + Eq,
Returns the key-value pair corresponding to the supplied key.
pub fn iter(&'a self) -> impl Iterator<Item = (&'a K, &'a V)> + 'a
[src][−]
An iterator visiting all key-value pairs in arbitrary order. The iterator element type is (&'a K, &'a V)
.
pub fn keys(&'a self) -> impl Iterator<Item = &'a K> + 'a
[src][−]
An iterator visiting all keys in arbitrary order. The iterator element type is &'a K
.
pub fn values(&'a self) -> impl Iterator<Item = &'a V> + 'a
[src][−]
An iterator visiting all values in arbitrary order. The iterator element type is &'a V
.
Trait Implementations
impl<K: Eq + Hash + Clone, V: Clone, S: Clone> Clone for ReadOnlyView<K, V, S>
[src][+]
impl<K: Eq + Hash + Debug, V: Debug, S: BuildHasher + Clone> Debug for ReadOnlyView<K, V, S>
[src][+]
Auto Trait Implementations
impl<K, V, S = RandomState> !RefUnwindSafe for ReadOnlyView<K, V, S>
impl<K, V, S> Send for ReadOnlyView<K, V, S> where
K: Send,
S: Send,
V: Send,
K: Send,
S: Send,
V: Send,
impl<K, V, S> Sync for ReadOnlyView<K, V, S> where
K: Send + Sync,
S: Send + Sync,
V: Send + Sync,
K: Send + Sync,
S: Send + Sync,
V: Send + Sync,
impl<K, V, S> Unpin for ReadOnlyView<K, V, S> where
S: Unpin,
S: Unpin,
impl<K, V, S> UnwindSafe for ReadOnlyView<K, V, S> where
K: UnwindSafe,
S: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
S: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Pointable for T
[src][+]
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,