Skip to main content

BuildableParserImpl

Trait BuildableParserImpl 

Source
pub unsafe trait BuildableParserImpl: Sized + 'static {
    // Required methods
    fn start_element(
        &mut self,
        ctx: &BuildableParseContext,
        element_name: &str,
        attributes: HashMap<String, String>,
    ) -> Result<(), Error>;
    fn end_element(
        &mut self,
        ctx: &BuildableParseContext,
        element_name: &str,
    ) -> Result<(), Error>;
    fn text(
        &mut self,
        ctx: &BuildableParseContext,
        text: &str,
    ) -> Result<(), Error>;

    // Provided method
    fn error(&mut self, _ctx: &BuildableParseContext, _error: Error) { ... }
}
Expand description

§Safety

Implementations must not panic in any of the callbacks, as they are called from C code that cannot handle Rust panics.

Required Methods§

Source

fn start_element( &mut self, ctx: &BuildableParseContext, element_name: &str, attributes: HashMap<String, String>, ) -> Result<(), Error>

Source

fn end_element( &mut self, ctx: &BuildableParseContext, element_name: &str, ) -> Result<(), Error>

Source

fn text(&mut self, ctx: &BuildableParseContext, text: &str) -> Result<(), Error>

Provided Methods§

Source

fn error(&mut self, _ctx: &BuildableParseContext, _error: Error)

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§