pub trait ListenerWrapper {
// Required method
fn get_mut_log(&mut self) -> &mut impl Logger;
// Provided methods
fn switch(
&mut self,
_call: Call,
_nt: u16,
_alt_id: u16,
_t_data: Option<Vec<String>>,
) { ... }
fn check_abort_request(&self) -> bool { ... }
fn abort(&mut self) { ... }
fn push_span(&mut self, _span: PosSpan) { ... }
fn is_stack_empty(&self) -> bool { ... }
fn is_stack_t_empty(&self) -> bool { ... }
fn is_stack_span_empty(&self) -> bool { ... }
}Required Methods§
Sourcefn get_mut_log(&mut self) -> &mut impl Logger
fn get_mut_log(&mut self) -> &mut impl Logger
Gets access to the listener’s log to report possible errors and information about the parsing.
Provided Methods§
Sourcefn switch(
&mut self,
_call: Call,
_nt: u16,
_alt_id: u16,
_t_data: Option<Vec<String>>,
)
fn switch( &mut self, _call: Call, _nt: u16, _alt_id: u16, _t_data: Option<Vec<String>>, )
Calls the listener to execute Enter, Loop, Exit, and End actions.
Sourcefn check_abort_request(&self) -> bool
fn check_abort_request(&self) -> bool
Checks if the wrapper requests an abort. This happens if an error is too difficult to recover from
and may corrupt the stack content. In that case, the parser immediately stops and returns ParserError::AbortRequest.
Sourcefn is_stack_empty(&self) -> bool
fn is_stack_empty(&self) -> bool
Checks that the stack is empty (the parser only checks that the stack is empty after successfully parsing a text)
Sourcefn is_stack_t_empty(&self) -> bool
fn is_stack_t_empty(&self) -> bool
Checks that the stack_t is empty (the parser only checks that the stack is empty after successfully parsing a text)
Sourcefn is_stack_span_empty(&self) -> bool
fn is_stack_span_empty(&self) -> bool
Checks that the stack_span is empty (the parser only checks that the stack is empty after successfully parsing a text)
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.