ReadableOptionExt

Trait ReadableOptionExt 

Source
pub trait ReadableOptionExt<T>: Readable<Target = Option<T>> {
    // Provided methods
    fn unwrap(&self) -> T
       where T: Clone + 'static { ... }
    fn as_ref(&self) -> Option<ReadableRef<'_, Self, T>>
       where T: 'static { ... }
}
Expand description

An extension trait for Readable<Option<T>> that provides some convenience methods.

Provided Methods§

Source

fn unwrap(&self) -> T
where T: Clone + 'static,

Unwraps the inner value and clones it.

Source

fn as_ref(&self) -> Option<ReadableRef<'_, Self, T>>
where T: 'static,

Attempts to read the inner value of the Option.

Implementors§

Source§

impl<T, R> ReadableOptionExt<T> for R
where R: Readable<Target = Option<T>>,