radicle_std_ext::ops

Trait Try

Source
pub trait Try: FromResidual {
    type Output;
    type Residual;

    // Required methods
    fn from_output(output: Self::Output) -> Self;
    fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
}

Required Associated Types§

Required Methods§

Source

fn from_output(output: Self::Output) -> Self

Source

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<B, C> Try for ControlFlow<B, C>

Source§

type Output = C

Source§

type Residual = ControlFlow<B, Infallible>

Source§

fn from_output(output: Self::Output) -> Self

Source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

Source§

impl<T> Try for Option<T>

Source§

type Output = T

Source§

type Residual = Option<Infallible>

Source§

fn from_output(output: Self::Output) -> Self

Source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

Source§

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

Source§

type Output = T

Source§

type Residual = Result<Infallible, E>

Source§

fn from_output(output: Self::Output) -> Self

Source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

Source§

impl<T, E> Try for Poll<Option<Result<T, E>>>

Source§

impl<T, E> Try for Poll<Result<T, E>>

Implementors§