pub struct NullSax;Expand description
A handler that discards every callback, using the trait’s default bodies.
Building a tree does not need the SAX event stream, but the tree entry
points used SaxRecorder, which deep-copies the local name, prefix, URI,
namespace list and every attribute of every element into a log that is
then dropped. On a 627 KB document that was over half of all allocations.
Trait Implementations§
impl Copy for NullSax
Source§impl SaxHandler for NullSax
impl SaxHandler for NullSax
fn set_document_locator(&mut self)
fn start_document(&mut self)
fn end_document(&mut self)
fn start_element_ns( &mut self, local: &str, prefix: Option<&str>, uri: Option<&str>, namespaces: &[(Option<String>, String)], attributes: &[SaxAttr], nb_defaulted: i32, )
fn end_element_ns( &mut self, local: &str, prefix: Option<&str>, uri: Option<&str>, )
fn characters(&mut self, data: &str)
fn cdata_block(&mut self, data: &str)
fn comment(&mut self, data: &str)
fn processing_instruction(&mut self, target: &str, data: Option<&str>)
fn warning(&mut self, msg: &str)
fn error(&mut self, msg: &str)
Auto Trait Implementations§
impl Freeze for NullSax
impl RefUnwindSafe for NullSax
impl Send for NullSax
impl Sync for NullSax
impl Unpin for NullSax
impl UnsafeUnpin for NullSax
impl UnwindSafe for NullSax
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more