IsResult

Trait IsResult 

Source
pub trait IsResult: Sealed {
    type Ok;
    type Err;

    // Required method
    fn into_result(self) -> Result<Self::Ok, Self::Err>;
}
Expand description

A helper trait enforcing that the type is Result.

Required Associated Types§

Source

type Ok

The type of success value.

Source

type Err

The type of error value.

Required Methods§

Source

fn into_result(self) -> Result<Self::Ok, Self::Err>

Consume itself and get the value of Result.

Implementations on Foreign Types§

Source§

impl<T, E> IsResult for Result<T, E>

Source§

type Ok = T

Source§

type Err = E

Source§

fn into_result(self) -> Result<Self::Ok, Self::Err>

Implementors§