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§
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 Methods§
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".