[][src]Struct dashmap::ElementGuard

pub struct ElementGuard<K, V> { /* fields omitted */ }

ElementGuard<K, V>'s are references to active or past map entries. They provide access to the key and value. They exist to automatically manage memory across threads to ensure a safe interface.

Implementations

impl<K, V> ElementGuard<K, V>[src]

pub fn pair(&self) -> (&K, &V)[src]

Get references to the key and value.

pub fn key(&self) -> &K[src]

Get a reference to the key.

pub fn value(&self) -> &V[src]

Get a reference to the value.

Trait Implementations

impl<K, V> Clone for ElementGuard<K, V>[src]

impl<K, V> Deref for ElementGuard<K, V>[src]

type Target = V

The resulting type after dereferencing.

impl<K, V> Drop for ElementGuard<K, V>[src]

impl<K: Send, V: Send> Send for ElementGuard<K, V>[src]

Safety

This is okay since we are not keeping any state that is not unsafe to share across threads. We are just working around the fact that pointers are not Send nor Sync.

impl<K: Sync, V: Sync> Sync for ElementGuard<K, V>[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for ElementGuard<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Unpin for ElementGuard<K, V>

impl<K, V> UnwindSafe for ElementGuard<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

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> 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.