pub trait EntityWalkerVisitor<'tu>: Sized {
// Required method
fn visit_entity(&mut self, entity: Entity<'tu>) -> ControlFlow<()>;
// Provided methods
fn wants_file(&mut self, path: &Path) -> bool { ... }
fn goodbye(self) { ... }
}
Expand description
Visitor to be used in conjunction with [EntityWalker]
Required Methods§
Sourcefn visit_entity(&mut self, entity: Entity<'tu>) -> ControlFlow<()>
fn visit_entity(&mut self, entity: Entity<'tu>) -> ControlFlow<()>
Pass a supported Entity to the visitor
Provided Methods§
Sourcefn wants_file(&mut self, path: &Path) -> bool
fn wants_file(&mut self, path: &Path) -> bool
Check whether the visitor is interested in entities from the specified file
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.