Trait spirt::visit::InnerVisit

source ·
pub trait InnerVisit {
    // Required method
    fn inner_visit_with<'a>(&'a self, visitor: &mut impl Visitor<'a>);
}
Expand description

Trait implemented on “deeply visitable” types, to further “explore” a type by visiting its “interior” (i.e. variants and/or fields).

That is, an impl InnerVisit for X will call the relevant Visitor method for each X field, effectively performing a single level of a deep visit. Also, if Visitor::visit_X exists for a given X, its default should be to call X::inner_visit_with (i.e. so that visiting is mostly-deep by default).

Required Methods§

source

fn inner_visit_with<'a>(&'a self, visitor: &mut impl Visitor<'a>)

Implementations on Foreign Types§

source§

impl InnerVisit for Vec<DiagMsgPart>

source§

fn inner_visit_with<'a>(&'a self, visitor: &mut impl Visitor<'a>)

Implementors§