spirt::visit

Trait 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>)

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§

Source§

impl InnerVisit for Vec<DiagMsgPart>

Source§

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

Implementors§