Trait rayon::iter::private::Try

source ·
pub trait Try {
    type Output;
    type Residual;

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

Clone of std::ops::Try.

Implementing this trait is not permitted outside of rayon.

Required Associated Types§

Required Methods§

source

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

source

fn from_residual(residual: Self::Residual) -> Self

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

§

type Output = C

§

type Residual = ControlFlow<B, Infallible>

source§

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

source§

fn from_residual(residual: Self::Residual) -> Self

source§

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

source§

impl<T> Try for Option<T>

§

type Output = T

§

type Residual = Option<Infallible>

source§

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

source§

fn from_residual(residual: Self::Residual) -> Self

source§

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

source§

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

§

type Output = T

§

type Residual = Result<Infallible, E>

source§

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

source§

fn from_residual(residual: Self::Residual) -> Self

source§

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

source§

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

§

type Output = Poll<Option<T>>

§

type Residual = Result<Infallible, E>

source§

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

source§

fn from_residual(residual: Self::Residual) -> Self

source§

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

source§

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

§

type Output = Poll<T>

§

type Residual = Result<Infallible, E>

source§

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

source§

fn from_residual(residual: Self::Residual) -> Self

source§

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

Implementors§