pub trait Folder: Sized {
    type Break;

    // Provided methods
    fn visit_ty(&mut self, ty: &Ty) -> ControlFlow<Self::Break, Ty> { ... }
    fn fold_const(&mut self, c: &Const) -> ControlFlow<Self::Break, Const> { ... }
}

Required Associated Types§

Provided Methods§

source

fn visit_ty(&mut self, ty: &Ty) -> ControlFlow<Self::Break, Ty>

source

fn fold_const(&mut self, c: &Const) -> ControlFlow<Self::Break, Const>

Implementors§

source§

impl Folder for GenericArgs

In order to instantiate a Foldable’s generic parameters with specific arguments, GenericArgs can be used as a Folder that replaces all mentions of generic params with the entries in its list.

§

type Break = Never