Type Alias Result

Source
pub type Result<T, E = Infallible> = Result<T, E>;
Expand description

A convenient type alias that by default assumes no error can happen.

It can be used to avoid type annotations when the function you want to use needs a callback that returns Result but in your case no error can happen.

Aliased Type§

pub enum Result<T, E = Infallible> {
    Ok(T),
    Err(E),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(E)

Contains the error value