Trait xml5ever::tokenizer::interface::TokenSink

source ·
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§

source

fn process_token(&self, token: Token)

Process a token.

Provided Methods§

source

fn end(&self)

Signal to the sink that parsing has ended.

source

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.

Implementors§

source§

impl<Handle, Sink> TokenSink for XmlTreeBuilder<Handle, Sink>
where Handle: Clone, Sink: TreeSink<Handle = Handle>,