pub trait TokenSink {
    // Required method
    fn process_token(&mut self, token: Token);

    // Provided methods
    fn end(&mut self) { ... }
    fn query_state_change(&mut self) -> Option<XmlState> { ... }
}
Expand description

Types which can receive tokens from the tokenizer.

Required Methods§

source

fn process_token(&mut self, token: Token)

Process a token.

Provided Methods§

source

fn end(&mut self)

Signal to the sink that parsing has ended.

source

fn query_state_change(&mut 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>,