Trait TokenSink
pub trait TokenSink {
// Provided methods
fn start_tag(&mut self, tag: &StartTag<'_>) { ... }
fn end_tag(&mut self, tag: &EndTag<'_>) { ... }
fn text(&mut self, text: &Text<'_>) { ... }
fn comment(&mut self, comment: &Comment<'_>) { ... }
fn cdata(&mut self, cdata: &Cdata<'_>) { ... }
fn doctype(&mut self, doctype: &Doctype<'_>) { ... }
}Available on crate features
html and http only.Expand description
Receives token events as the tokenizer scans HTML.
Every method has a default no-op body, so a sink only overrides the events it cares about. Token views borrow the input and are valid only for the duration of the call.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".