Unwrap

Trait Unwrap 

Source
pub trait Unwrap: Sealed {
    type Out;

    // Required methods
    fn unwrap(self) -> Self::Out;
    fn expect(self, msg: &str) -> Self::Out;
}
Expand description

This trait is implemented for Option and Result types.

This trait is sealed.

Required Associated Types§

Source

type Out

Out type of the unwrap operation.

This will be T for Option<T> and Result<T, E>.

Required Methods§

Source

fn unwrap(self) -> Self::Out

Source

fn expect(self, msg: &str) -> Self::Out

Implementations on Foreign Types§

Source§

impl<T> Unwrap for Option<T>

Source§

type Out = T

Source§

fn unwrap(self) -> Self::Out

Source§

fn expect(self, msg: &str) -> Self::Out

Source§

impl<T, E: Debug> Unwrap for Result<T, E>

Source§

type Out = T

Source§

fn unwrap(self) -> Self::Out

Source§

fn expect(self, msg: &str) -> Self::Out

Implementors§