pub enum Token {
Show 24 variants
Ident {
value: Atom,
raw: Atom,
},
Function {
value: Atom,
raw: Atom,
},
AtKeyword {
value: Atom,
raw: Atom,
},
Hash {
is_id: bool,
value: Atom,
raw: Atom,
},
String {
value: Atom,
raw: Atom,
},
BadString {
raw: Atom,
},
Url {
value: Atom,
raw: Box<UrlKeyValue>,
},
BadUrl {
raw: Atom,
},
Delim {
value: char,
},
Number {
value: f64,
raw: Atom,
type_flag: NumberType,
},
Percentage {
value: f64,
raw: Atom,
},
Dimension(Box<DimensionToken>),
WhiteSpace {
value: Atom,
},
CDO,
CDC,
Colon,
Semi,
Comma,
LBracket,
RBracket,
LParen,
RParen,
LBrace,
RBrace,
}
Variants§
Ident
Function
AtKeyword
@
Hash
#
String
BadString
Url
url(value)
BadUrl
Delim
Number
Percentage
Dimension(Box<DimensionToken>)
WhiteSpace
One or more whitespace.
CDO
<!--
CDC
-->
Colon
`:``
Semi
;
Comma
,
LBracket
[
RBracket
]
LParen
(
RParen
)
LBrace
{
RBrace
}
Trait Implementations§
Source§impl EqIgnoreSpan for Token
impl EqIgnoreSpan for Token
fn eq_ignore_span(&self, other: &Self) -> bool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more