Skip to main content

ElementParser

Trait ElementParser 

Source
pub trait ElementParser: Sized {
    // Required method
    fn parse_element_state<E: ElementState>(self, state: &mut E) -> Result<()>;
}
Expand description

A parser that is ready to parse exactly one element (and nested data).

Required Methods§

Source

fn parse_element_state<E: ElementState>(self, state: &mut E) -> Result<()>

Start parsing an element with the prepared state

A parser will call the various ElementState to parse the element.

Users of this method will create the state using ElementState::parse_element_start and produce the final result using ElementState::parse_element_finish after calling this method.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§