pub(crate) trait DocVisitor<'a>: Sized {
// Provided methods
fn visit_item(&mut self, item: &'a Item) { ... }
fn visit_inner_recur(&mut self, kind: &'a ItemKind) { ... }
fn visit_item_recur(&mut self, item: &'a Item) { ... }
fn visit_mod(&mut self, m: &'a Module) { ... }
fn visit_crate(&mut self, c: &'a Crate) { ... }
}
Expand description
Allows a type to traverse the cleaned ast of a crate.
Note that like rustc_ast::visit::Visitor
, but
unlike rustc_lint::EarlyLintPass
, if you override a
visit_*
method, you will need to manually recurse into
its contents.
Provided Methods§
fn visit_item(&mut self, item: &'a Item)
sourcefn visit_inner_recur(&mut self, kind: &'a ItemKind)
fn visit_inner_recur(&mut self, kind: &'a ItemKind)
Don’t override!
sourcefn visit_item_recur(&mut self, item: &'a Item)
fn visit_item_recur(&mut self, item: &'a Item)
Don’t override!
fn visit_mod(&mut self, m: &'a Module)
sourcefn visit_crate(&mut self, c: &'a Crate)
fn visit_crate(&mut self, c: &'a Crate)
This is the main entrypoint of DocVisitor
.
Object Safety§
This trait is not object safe.