pub enum State {
Data,
Eof,
}Expand description
The current state of the CSS tokenizer.
Unlike the HTML tokenizer (which has ~80 explicit states per WHATWG
§13.2.5), the CSS tokenizer is a recursive-descent algorithm: the
main entry point consume_a_token (§4.3.1) dispatches to
sub-algorithms without a persistent state machine. State is
therefore minimal — it only tracks the top-level position (consuming
tokens vs. EOF emitted) for the [Tokenizer::next_token] iterator
protocol.
Variants§
Data
The tokenizer is at the top level, ready to consume the next token via §4.3.1.
Eof
The tokenizer has emitted <EOF-token>; subsequent
next_token() calls return None.
Trait Implementations§
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Forget for State
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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