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

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

Provided Methods§

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

Unwraps the inner value and clones it.

fn as_ref(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>

Attempts to read the inner value of the Option.

Object Safety§

This trait is not object safe.

Implementors§

§

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