[][src]Struct dashmap::ReadOnlyView

pub struct ReadOnlyView<K, V, S = RandomState> { /* fields omitted */ }

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]

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]

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]

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>[src]

impl<K, V, S> Send for ReadOnlyView<K, V, S> where
    K: Send,
    S: Send,
    V: Send
[src]

impl<K, V, S> Sync for ReadOnlyView<K, V, S> where
    K: Send + Sync,
    S: Send + Sync,
    V: Send + Sync
[src]

impl<K, V, S> Unpin for ReadOnlyView<K, V, S> where
    S: Unpin
[src]

impl<K, V, S> UnwindSafe for ReadOnlyView<K, V, S> where
    K: UnwindSafe,
    S: UnwindSafe,
    V: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.