Trait Unwrappable

Source
pub trait Unwrappable<T, R> {
    type Output: Debug + PartialEq<R>;

    // Required method
    fn unwrap_into(self) -> Self::Output;
}
Expand description

A trait that can be R, Result<R>, Option<R>, Result<Option<R>>, or Option<Result<R>> and can unwrap to return R.

Required Associated Types§

Required Methods§

Source

fn unwrap_into(self) -> Self::Output

Implementations on Foreign Types§

Source§

impl<T: Debug + PartialEq + PartialEq<R>, R: Debug + PartialEq<T>> Unwrappable<T, R> for Option<T>

Source§

type Output = T

Source§

fn unwrap_into(self) -> Self::Output

Source§

impl<T: Debug + PartialEq + PartialEq<R>, R: Debug + PartialEq<T>, E: Debug> Unwrappable<T, R> for Option<Result<T, E>>

Source§

type Output = T

Source§

fn unwrap_into(self) -> Self::Output

Source§

impl<T: Debug + PartialEq + PartialEq<R>, R: Debug + PartialEq<T>, E: Debug> Unwrappable<T, R> for Result<Option<T>, E>

Source§

type Output = T

Source§

fn unwrap_into(self) -> Self::Output

Source§

impl<T: Debug + PartialEq + PartialEq<R>, R: Debug + PartialEq<T>, E: Debug> Unwrappable<T, R> for Result<T, E>

Source§

type Output = T

Source§

fn unwrap_into(self) -> Self::Output

Implementors§

Source§

impl<T: Debug + PartialEq + PartialEq<R>, R: Debug + PartialEq<T>> Unwrappable<T, R> for T