Trait TokenSink

Source
pub trait TokenSink {
    type Handle;

    // Required method
    fn process_token(&self, token: Token) -> ProcessResult<Self::Handle>;

    // Provided method
    fn end(&self) { ... }
}
Expand description

Types which can receive tokens from the tokenizer.

Required Associated Types§

Source

type Handle

Handle to a DOM script element

Required Methods§

Source

fn process_token(&self, token: Token) -> ProcessResult<Self::Handle>

Process a token.

Provided Methods§

Source

fn end(&self)

Signal to the sink that parsing has ended.

Implementors§

Source§

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

Source§

type Handle = Handle