Trait ReadableResultExt

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

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

Provided Methods§

Source

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

Unwraps the inner value and clones it.

Source

fn as_ref(&self) -> Result<ReadableRef<'_, Self, T>, ReadableRef<'_, Self, E>>

Attempts to read the inner value of the Option.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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