pub trait TrySpannedEventReceiver<'input> {
type Error;
// Required method
fn on_event(
&mut self,
ev: Event<'input>,
span: Span,
) -> Result<(), Self::Error>;
}Expand description
Trait to be implemented for fallible event handling with source spans.
This is the fallible counterpart to SpannedEventReceiver. Use it with
Parser::try_load when event handling may need to stop parsing by returning an application
error.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".