pub struct Tokenizer<Sink> {
pub sink: Sink,
/* private fields */
}
Expand description
The HTML tokenizer.
Fields
sink: Sink
Destination for tokens we emit.
Implementations
sourceimpl<Sink: TokenSink> Tokenizer<Sink>
impl<Sink: TokenSink> Tokenizer<Sink>
sourcepub fn new(sink: Sink, opts: TokenizerOpts) -> Tokenizer<Sink>
pub fn new(sink: Sink, opts: TokenizerOpts) -> Tokenizer<Sink>
Create a new tokenizer which feeds tokens to a particular TokenSink
.
sourcepub fn feed(&mut self, input: &mut BufferQueue) -> TokenizerResult<Sink::Handle>
pub fn feed(&mut self, input: &mut BufferQueue) -> TokenizerResult<Sink::Handle>
Feed an input string into the tokenizer.
pub fn set_plaintext_state(&mut self)
Auto Trait Implementations
impl<Sink> !RefUnwindSafe for Tokenizer<Sink>
impl<Sink> !Send for Tokenizer<Sink>
impl<Sink> !Sync for Tokenizer<Sink>
impl<Sink> Unpin for Tokenizer<Sink> where
Sink: Unpin,
impl<Sink> UnwindSafe for Tokenizer<Sink> where
Sink: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more