Trait UnwrapExt

Source
pub trait UnwrapExt {
    type Output;

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

Extension for unwrap methods.

Required Associated Types§

Required Methods§

Source

fn unwrap_all(self) -> Self::Output

unwrap the value.

§Example
use rs_std_ext::unwrap::UnwrapExt;
 
let val: Result<Option<i32>, &str> = Ok(Some(10));
assert_eq!(
    10,
    val.unwrap_all()
)

Implementations on Foreign Types§

Source§

impl<T> UnwrapExt for Option<Option<T>>

Source§

type Output = T

Source§

fn unwrap_all(self) -> Self::Output

Source§

impl<T, E1: Debug, E2: Debug> UnwrapExt for Result<Result<T, E1>, E2>

Source§

type Output = T

Source§

fn unwrap_all(self) -> Self::Output

Source§

impl<T, E: Debug> UnwrapExt for Option<Result<T, E>>

Source§

type Output = T

Source§

fn unwrap_all(self) -> Self::Output

Source§

impl<T, E: Debug> UnwrapExt for Result<Option<T>, E>

Source§

type Output = T

Source§

fn unwrap_all(self) -> Self::Output

Implementors§