Trait freya::prelude::ReadableResultExt

pub trait ReadableResultExt<T, E>: Readable<Target = Result<T, E>>
where T: 'static, E: 'static,
{ // Provided methods fn unwrap(&self) -> T where T: Clone { ... } fn as_ref( &self ) -> Result<<Self::Storage as AnyStorage>::Ref<'_, T>, <Self::Storage as AnyStorage>::Ref<'_, E>> { ... } }
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 ) -> Result<<Self::Storage as AnyStorage>::Ref<'_, T>, <Self::Storage as AnyStorage>::Ref<'_, E>>

Attempts to read the inner value of the Option.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T, E, R> ReadableResultExt<T, E> for R
where T: 'static, E: 'static, R: Readable<Target = Result<T, E>>,