pub trait Visitor<'a, T>: Sized {
// Required method
fn accept(scanner: &mut Scanner<'a, T>) -> ParseResult<Self>;
}Expand description
A Visitor is a trait that allows to define how to visit a Scanner.
When a Visitor is used on a Scanner, it will consume the input from the
scanner and return the result of the visit.
§Type Parameters
T- The type of the data to visit.
§Associated Functions
accept- Try to accept theScannerand return the result of the visit.
Required Methods§
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.