VisitorResult

Trait VisitorResult 

pub trait VisitorResult {
    type Residual;

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

Similar to the Try trait, but also implemented for ().

Required Associated Types§

Required Methods§

fn output() -> Self

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

fn from_branch(b: ControlFlow<Self::Residual>) -> Self

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

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§

§

impl VisitorResult for ()

§

impl<T> VisitorResult for ControlFlow<T>

§

type Residual = T

§

fn output() -> ControlFlow<T>

§

fn from_residual(residual: T) -> ControlFlow<T>

§

fn from_branch(b: ControlFlow<T>) -> ControlFlow<T>

§

fn branch(self) -> ControlFlow<T>

Implementors§