pub enum Token {
Doctype {
name: Option<String>,
public_id: Option<String>,
system_id: Option<String>,
},
StartTag {
name: String,
attributes: Vec<(String, String)>,
self_closing: bool,
},
EndTag {
name: String,
},
Comment(String),
Character(char),
Eof,
}Expand description
A token produced by the tokenizer.
Variants§
Doctype
A DOCTYPE token.
StartTag
A start tag token.
EndTag
An end tag token.
Comment(String)
A comment token.
Character(char)
A character token (text content).
Eof
End of file.
Trait Implementations§
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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