pub struct Tokenizer<Sink> {
pub sink: Sink,
/* private fields */
}
Expand description
The HTML tokenizer.
Fields§
§sink: Sink
Destination for tokens we emit.
Implementations§
source§impl<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(&self, input: &BufferQueue) -> TokenizerResult<Sink::Handle>
pub fn feed(&self, input: &BufferQueue) -> TokenizerResult<Sink::Handle>
Feed an input string into the tokenizer.
pub fn set_plaintext_state(&self)
Auto Trait Implementations§
impl<Sink> !Freeze for Tokenizer<Sink>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more