Trait AlwaysOk

Source
pub trait AlwaysOk<T> {
    // Required method
    fn aok(self) -> T;
}
Expand description

A type may generically hold errors but is guaranteed never to do so in a particular instance. Stand-in for #[feature(unwrap_infallible)]

Required Methods§

Source

fn aok(self) -> T

Extract a value of a type from a generic error type statically guaranteed never to hold an error.

Implementations on Foreign Types§

Source§

impl<T, I> AlwaysOk<T> for Result<T, I>
where I: Into<Infallible>,

Source§

fn aok(self) -> T

Implementors§