rustc_ast_ir::visit

Trait VisitorResult

source
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§

source

fn output() -> Self

source

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

source

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

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl VisitorResult for ()

source§

type Residual = !

source§

fn output() -> Self

source§

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

source§

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

source§

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

source§

impl<T> VisitorResult for ControlFlow<T>

source§

type Residual = T

source§

fn output() -> Self

source§

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

source§

fn from_branch(b: Self) -> Self

source§

fn branch(self) -> Self

Implementors§