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]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,