#[non_exhaustive]pub enum Token<'a> {
Start {
name: &'a str,
attrs: Vec<(&'a str, &'a str)>,
empty: bool,
},
End {
name: &'a str,
},
Text(&'a str),
CData(&'a str),
Eof,
}Expand description
what the lenient reader found next
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Start
a start tag: its name as written and its attributes with their raw values (“” for none)
End
an end tag
Text(&'a str)
character data as written (decode replaces the references)
CData(&'a str)
a CDATA section’s content as written
Eof
the end of the text
Trait Implementations§
impl<'a> Eq for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Forget for Token<'a>
impl<'a> Freeze for Token<'a>
impl<'a> Move for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>where
RawVecInner: Sync,
impl<'a> Unpin for Token<'a>
impl<'a> UnsafeUnpin for Token<'a>where
&'a str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(&'a str, &'a str)>: UnsafeUnpin,
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