[][src]Struct ev_slotmap::ReadHandle

pub struct ReadHandle<K, P, V> where
    K: Key<P>, 
{ /* fields omitted */ }

A handle that may be used to read from the concurrent slot map.

Implementations

impl<K, P, V> ReadHandle<K, P, V> where
    K: Key<P>, 
[src]

pub fn factory(&self) -> ReadHandleFactory<K, P, V>[src]

Create a new Sync type that can produce additional ReadHandles for use in other threads.

impl<K, P, V> ReadHandle<K, P, V> where
    K: Key<P>, 
[src]

pub fn read(&self) -> Option<MapReadRef<'_, K, P, V>>[src]

Take out a guarded live reference to the read side of the map.

This lets you perform more complex read operations on the map.

While the reference lives, the map cannot be refreshed.

If no refresh has happened, or the map has been destroyed, this function returns None.

See MapReadRef.

pub fn len(&self) -> usize[src]

Returns the number of non-empty keys present in the map.

pub fn is_empty(&self) -> bool[src]

Returns true if the map contains no non-empty keys.

pub fn get<'rh>(&'rh self, key: &K) -> Option<ReadGuard<'rh, V>>[src]

Returns a guarded reference to the value corresponding to the key.

While the guard lives, the map cannot be refreshed.

If no writes have happened or if the write handle has been dropped, then None is returned here

pub fn is_destroyed(&self) -> bool[src]

Returns true if the writer has destroyed this map (This happens when the writer is dropped).

pub fn contains_key(&self, key: &K) -> bool[src]

Returns true if the map contains a value for the specified key.

Trait Implementations

impl<K, P, V> Clone for ReadHandle<K, P, V> where
    K: Key<P>, 
[src]

impl<K, P, V> Debug for ReadHandle<K, P, V> where
    K: Debug + Key<P>, 
[src]

impl<K, P, V> Drop for ReadHandle<K, P, V> where
    K: Key<P>, 
[src]

Auto Trait Implementations

impl<K, P, V> !RefUnwindSafe for ReadHandle<K, P, V>

impl<K, P, V> Send for ReadHandle<K, P, V> where
    K: Send,
    P: Send

impl<K, P, V> !Sync for ReadHandle<K, P, V>

impl<K, P, V> Unpin for ReadHandle<K, P, V> where
    K: Unpin,
    P: Unpin

impl<K, P, V> UnwindSafe for ReadHandle<K, P, V> where
    K: UnwindSafe,
    P: UnwindSafe

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.