pub trait TokenSink {
// Required method
fn process_token(&self, token: Token);
// Provided methods
fn end(&self) { ... }
fn query_state_change(&self) -> Option<XmlState> { ... }
}
Expand description
Types which can receive tokens from the tokenizer.
Required Methods§
sourcefn process_token(&self, token: Token)
fn process_token(&self, token: Token)
Process a token.
Provided Methods§
sourcefn query_state_change(&self) -> Option<XmlState>
fn query_state_change(&self) -> Option<XmlState>
The tokenizer will call this after emitting any start tag. This allows the tree builder to change the tokenizer’s state. By default no state changes occur.