[][src]Struct option_lock::OptionRead

pub struct OptionRead<'a, T> { /* fields omitted */ }

A read guard for the value of a populated OptionLock

Implementations

impl<'a, T: 'a> OptionRead<'a, T>[src]

pub fn try_lock(
    read: OptionRead<'a, T>
) -> Result<OptionGuard<'a, T>, OptionRead<'a, T>>
[src]

Try to upgrade a read guard to a write guard.

This requires that there are no other active readers.

pub fn try_take(read: OptionRead<'a, T>) -> Result<T, OptionRead<'a, T>>[src]

Try to take the contained value from an acquired read guard.

This requires that there are no other active readers.

Trait Implementations

impl<'_, T: Debug> Debug for OptionRead<'_, T>[src]

impl<'_, T> Deref for OptionRead<'_, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'_, T: Display> Display for OptionRead<'_, T>[src]

impl<'_, T> Drop for OptionRead<'_, T>[src]

impl<'_, T> Eq for OptionRead<'_, T>[src]

impl<'_, T> PartialEq<OptionRead<'_, T>> for OptionRead<'_, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for OptionRead<'a, T>

impl<'a, T> Send for OptionRead<'a, T> where
    T: Send

impl<'a, T> Sync for OptionRead<'a, T> where
    T: Send

impl<'a, T> Unpin for OptionRead<'a, T>

impl<'a, T> !UnwindSafe for OptionRead<'a, T>

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> ToString for T where
    T: Display + ?Sized
[src]

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.