#[repr(u8)]pub enum Token<'a> {
StartTag(Tag<'a>),
EndTag(Tag<'a>),
Text(Cow<'a, str>),
Comment(Cow<'a, str>),
Doctype(Doctype<'a>),
ProcessingInstruction {
target: Cow<'a, str>,
data: Cow<'a, str>,
},
}Expand description
An HTML token. Adjacent text tokens may be emitted separately.
Variants§
StartTag(Tag<'a>)
An opening tag.
EndTag(Tag<'a>)
A closing tag.
Text(Cow<'a, str>)
Input newlines are normalized; data and RCDATA states also decode references.
Comment(Cow<'a, str>)
An HTML comment, including bogus comments.
Doctype(Doctype<'a>)
A document type declaration.
ProcessingInstruction
A processing instruction as defined by the HTML Living Standard.
Trait Implementations§
impl<'a> Eq for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnsafeUnpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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