pub trait ReadableResultExt<T, E>: Readable<Target = Result<T, E>> {
// Provided methods
fn unwrap(&self) -> T
where T: Clone + 'static,
E: 'static { ... }
fn as_ref(
&self,
) -> Result<<Self::Storage as AnyStorage>::Ref<'_, T>, <Self::Storage as AnyStorage>::Ref<'_, E>>
where T: 'static,
E: 'static { ... }
}Available on crate feature
prelude only.Expand description
An extension trait for Readable<Option<T>> that provides some convenience methods.
Provided Methods§
Sourcefn unwrap(&self) -> Twhere
T: Clone + 'static,
E: 'static,
fn unwrap(&self) -> Twhere
T: Clone + 'static,
E: 'static,
Unwraps the inner value and clones it.
Sourcefn as_ref(
&self,
) -> Result<<Self::Storage as AnyStorage>::Ref<'_, T>, <Self::Storage as AnyStorage>::Ref<'_, E>>where
T: 'static,
E: 'static,
fn as_ref(
&self,
) -> Result<<Self::Storage as AnyStorage>::Ref<'_, T>, <Self::Storage as AnyStorage>::Ref<'_, E>>where
T: 'static,
E: 'static,
Attempts to read the inner value of the Option.