Skip to main content

SpannedEventReceiver

Trait SpannedEventReceiver 

Source
pub trait SpannedEventReceiver<'input> {
    // Required method
    fn on_event(&mut self, ev: Event<'input>, span: Span);
}
Expand description

Trait to be implemented for using the low-level parsing API.

Functionally similar to EventReceiver, but receives a Span as well as the event. For Event::Comment, the span is the source range of the whole comment.

Required Methods§

Source

fn on_event(&mut self, ev: Event<'input>, span: Span)

Handler called for each event that occurs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'input, R: EventReceiver<'input>> SpannedEventReceiver<'input> for R