pub enum CssTokenType {
Show 71 variants
Whitespace,
Newline,
Comment,
StringLiteral,
NumberLiteral,
ColorLiteral,
UrlLiteral,
Identifier,
ClassName,
IdSelector,
TagName,
PseudoClass,
PseudoElement,
AttributeName,
PropertyName,
FunctionName,
Important,
Inherit,
Initial,
Unset,
Auto,
None,
Normal,
Px,
Em,
Rem,
Percent,
Vh,
Vw,
Pt,
Cm,
Mm,
In,
Pc,
Ex,
Ch,
Vmin,
Vmax,
Colon,
Semicolon,
Comma,
Dot,
Hash,
Plus,
Minus,
Star,
Slash,
Equals,
Tilde,
Pipe,
Caret,
Dollar,
GreaterThan,
LeftParen,
RightParen,
LeftBrace,
RightBrace,
LeftBracket,
RightBracket,
AtImport,
AtMedia,
AtKeyframes,
AtFontFace,
AtCharset,
AtNamespace,
AtSupports,
AtPage,
AtDocument,
AtRule,
Eof,
Error,
}Expand description
CSS token type
Variants§
Whitespace
Whitespace
Newline
Newline
Comment
Comment
StringLiteral
String literal
NumberLiteral
Number literal
ColorLiteral
Color literal
UrlLiteral
Url literal
Identifier
Identifier
ClassName
Class name
IdSelector
Id selector
TagName
Tag name
PseudoClass
Pseudo class
PseudoElement
Pseudo element
AttributeName
Attribute name
PropertyName
Property name
FunctionName
Function name
Important
!important
Inherit
inherit
Initial
initial
Unset
unset
Auto
auto
None
none
Normal
normal
Px
px
Em
em
Rem
rem
Percent
%
Vh
vh
Vw
vw
Pt
pt
Cm
cm
Mm
mm
In
in
Pc
pc
Ex
ex
Ch
ch
Vmin
vmin
Vmax
vmax
Colon
:
Semicolon
;
Comma
,
Dot
.
Hash
Plus
Minus
Star
Slash
/
Equals
=
Tilde
~
Pipe
|
Caret
^
Dollar
$
GreaterThan
LeftParen
(
RightParen
)
LeftBrace
{
RightBrace
}
LeftBracket
[
RightBracket
]
AtImport
@import
AtMedia
@media
AtKeyframes
@keyframes
AtFontFace
@font-face
AtCharset
@charset
AtNamespace
@namespace
AtSupports
@supports
AtPage
@page
AtDocument
@document
AtRule
Generic @-rule
Eof
End of file
Error
Error
Trait Implementations§
Source§impl Clone for CssTokenType
impl Clone for CssTokenType
Source§fn clone(&self) -> CssTokenType
fn clone(&self) -> CssTokenType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CssTokenType
impl Debug for CssTokenType
Source§impl<'de> Deserialize<'de> for CssTokenType
impl<'de> Deserialize<'de> for CssTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CssTokenType> for CssElementType
impl From<CssTokenType> for CssElementType
Source§fn from(token: CssTokenType) -> Self
fn from(token: CssTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for CssTokenType
impl Hash for CssTokenType
Source§impl Ord for CssTokenType
impl Ord for CssTokenType
Source§fn cmp(&self, other: &CssTokenType) -> Ordering
fn cmp(&self, other: &CssTokenType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CssTokenType
impl PartialEq for CssTokenType
Source§impl PartialOrd for CssTokenType
impl PartialOrd for CssTokenType
Source§impl Serialize for CssTokenType
impl Serialize for CssTokenType
Source§impl TokenType for CssTokenType
impl TokenType for CssTokenType
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
A constant representing the end of the input stream. Read more
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.). Read more
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment. Read more
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace. Read more
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this token matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalTokenRole) -> bool
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_error(&self) -> bool
fn is_error(&self) -> bool
Returns true if this token represents an error condition. Read more
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream. Read more
impl Copy for CssTokenType
impl Eq for CssTokenType
impl StructuralPartialEq for CssTokenType
Auto Trait Implementations§
impl Freeze for CssTokenType
impl RefUnwindSafe for CssTokenType
impl Send for CssTokenType
impl Sync for CssTokenType
impl Unpin for CssTokenType
impl UnwindSafe for CssTokenType
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