pub trait Visitor<'thir, 'tcx: 'thir>: Sized {
// Required method
fn thir(&self) -> &'thir Thir<'tcx>;
// Provided methods
fn visit_expr(&mut self, expr: &'thir Expr<'tcx>) { ... }
fn visit_stmt(&mut self, stmt: &'thir Stmt<'tcx>) { ... }
fn visit_block(&mut self, block: &'thir Block) { ... }
fn visit_arm(&mut self, arm: &'thir Arm<'tcx>) { ... }
fn visit_pat(&mut self, pat: &'thir Pat<'tcx>) { ... }
}
Required Methods§
Provided Methods§
fn visit_expr(&mut self, expr: &'thir Expr<'tcx>)
fn visit_stmt(&mut self, stmt: &'thir Stmt<'tcx>)
fn visit_block(&mut self, block: &'thir Block)
fn visit_arm(&mut self, arm: &'thir Arm<'tcx>)
fn visit_pat(&mut self, pat: &'thir Pat<'tcx>)
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.