pub enum TokenSinkResult<Handle> {
Continue,
Script(Handle),
Plaintext,
RawData(RawKind),
EncodingIndicator(StrTendril),
}Expand description
The result of a TokenSink consuming a single token.
Variants§
Continue
The tokenizer can continue parsing the input as usual.
Script(Handle)
The token sink has completed parsing a <script> tag, blocking the tokenizer
until the script is executed.
Plaintext
The tokenizer should set its state to the PLAINTEXT state.
RawData(RawKind)
The tokenizer should set its state to the given rawdata state.
EncodingIndicator(StrTendril)
The document indicated that the given encoding should be used to parse it.
HTML5-compatible implementations should parse the encoding label using the algorithm described in https://encoding.spec.whatwg.org/#concept-encoding-get. The label has not been validated by html5ever. Invalid or unknown encodings can be ignored.
If the decoder is confident that the current encoding is correct then this message can safely be ignored.