pub enum Token<'s> {
Show 60 variants
Eof(Eof),
Ampersand(Ampersand),
Asterisk(Asterisk),
AsteriskEqual(AsteriskEqual),
At(At),
AtKeyword(AtKeyword<'s>),
AtLBraceVar(AtLBraceVar<'s>),
BacktickCode(BacktickCode<'s>),
Bar(Bar),
BarBar(BarBar),
BarEqual(BarEqual),
CaretEqual(CaretEqual),
Cdc(Cdc),
Cdo(Cdo),
Colon(Colon),
ColonColon(ColonColon),
Comma(Comma),
Dedent(Dedent),
Dimension(Dimension<'s>),
DollarEqual(DollarEqual),
DollarLBraceVar(DollarLBraceVar<'s>),
DollarVar(DollarVar<'s>),
Dot(Dot),
DotDotDot(DotDotDot),
Equal(Equal),
EqualEqual(EqualEqual),
Exclamation(Exclamation),
ExclamationEqual(ExclamationEqual),
GreaterThan(GreaterThan),
GreaterThanEqual(GreaterThanEqual),
Hash(Hash<'s>),
HashLBrace(HashLBrace),
Ident(Ident<'s>),
Indent(Indent),
LBrace(LBrace),
LBracket(LBracket),
LessThan(LessThan),
LessThanEqual(LessThanEqual),
Linebreak(Linebreak),
LParen(LParen),
Minus(Minus),
Number(Number<'s>),
NumberSign(NumberSign),
Percent(Percent),
Percentage(Percentage<'s>),
Placeholder(Placeholder<'s>),
Plus(Plus),
PlusUnderscore(PlusUnderscore),
Question(Question),
RBrace(RBrace),
RBracket(RBracket),
RParen(RParen),
Semicolon(Semicolon),
Solidus(Solidus),
Str(Str<'s>),
StrTemplate(StrTemplate<'s>),
Tilde(Tilde),
TildeEqual(TildeEqual),
UrlRaw(UrlRaw<'s>),
UrlTemplate(UrlTemplate<'s>),
}Variants§
Eof(Eof)
Ampersand(Ampersand)
Asterisk(Asterisk)
AsteriskEqual(AsteriskEqual)
At(At)
AtKeyword(AtKeyword<'s>)
AtLBraceVar(AtLBraceVar<'s>)
BacktickCode(BacktickCode<'s>)
Bar(Bar)
BarBar(BarBar)
BarEqual(BarEqual)
CaretEqual(CaretEqual)
Cdc(Cdc)
Cdo(Cdo)
Colon(Colon)
ColonColon(ColonColon)
Comma(Comma)
Dedent(Dedent)
Dimension(Dimension<'s>)
DollarEqual(DollarEqual)
DollarLBraceVar(DollarLBraceVar<'s>)
DollarVar(DollarVar<'s>)
Dot(Dot)
DotDotDot(DotDotDot)
Equal(Equal)
EqualEqual(EqualEqual)
Exclamation(Exclamation)
ExclamationEqual(ExclamationEqual)
GreaterThan(GreaterThan)
GreaterThanEqual(GreaterThanEqual)
Hash(Hash<'s>)
HashLBrace(HashLBrace)
Ident(Ident<'s>)
Indent(Indent)
LBrace(LBrace)
LBracket(LBracket)
LessThan(LessThan)
LessThanEqual(LessThanEqual)
Linebreak(Linebreak)
LParen(LParen)
Minus(Minus)
Number(Number<'s>)
NumberSign(NumberSign)
Percent(Percent)
Percentage(Percentage<'s>)
Placeholder(Placeholder<'s>)
Plus(Plus)
PlusUnderscore(PlusUnderscore)
Question(Question)
RBrace(RBrace)
RBracket(RBracket)
RParen(RParen)
Semicolon(Semicolon)
Solidus(Solidus)
Str(Str<'s>)
StrTemplate(StrTemplate<'s>)
Tilde(Tilde)
TildeEqual(TildeEqual)
UrlRaw(UrlRaw<'s>)
UrlTemplate(UrlTemplate<'s>)
Implementations§
§impl<'s> Token<'s>
impl<'s> Token<'s>
pub fn is_ampersand(&self) -> bool
pub fn is_ampersand(&self) -> bool
Checks whether this is Ampersand.
pub fn as_ampersand(&self) -> Option<&Ampersand>
pub fn as_ampersand(&self) -> Option<&Ampersand>
pub fn is_asterisk(&self) -> bool
pub fn is_asterisk(&self) -> bool
Checks whether this is Asterisk.
pub fn as_asterisk(&self) -> Option<&Asterisk>
pub fn as_asterisk(&self) -> Option<&Asterisk>
pub fn is_asterisk_equal(&self) -> bool
pub fn is_asterisk_equal(&self) -> bool
Checks whether this is AsteriskEqual.
pub fn as_asterisk_equal(&self) -> Option<&AsteriskEqual>
pub fn as_asterisk_equal(&self) -> Option<&AsteriskEqual>
Returns Some with a reference to AsteriskEqual, otherwise None.
pub fn is_at_keyword(&self) -> bool
pub fn is_at_keyword(&self) -> bool
Checks whether this is AtKeyword.
pub fn as_at_keyword(&self) -> Option<&AtKeyword<'s>>
pub fn as_at_keyword(&self) -> Option<&AtKeyword<'s>>
pub fn is_at_l_brace_var(&self) -> bool
pub fn is_at_l_brace_var(&self) -> bool
Checks whether this is AtLBraceVar.
pub fn as_at_l_brace_var(&self) -> Option<&AtLBraceVar<'s>>
pub fn as_at_l_brace_var(&self) -> Option<&AtLBraceVar<'s>>
Returns Some with a reference to AtLBraceVar, otherwise None.
pub fn is_backtick_code(&self) -> bool
pub fn is_backtick_code(&self) -> bool
Checks whether this is BacktickCode.
pub fn as_backtick_code(&self) -> Option<&BacktickCode<'s>>
pub fn as_backtick_code(&self) -> Option<&BacktickCode<'s>>
Returns Some with a reference to BacktickCode, otherwise None.
pub fn is_bar_bar(&self) -> bool
pub fn is_bar_bar(&self) -> bool
Checks whether this is BarBar.
pub fn is_bar_equal(&self) -> bool
pub fn is_bar_equal(&self) -> bool
Checks whether this is BarEqual.
pub fn as_bar_equal(&self) -> Option<&BarEqual>
pub fn as_bar_equal(&self) -> Option<&BarEqual>
pub fn is_caret_equal(&self) -> bool
pub fn is_caret_equal(&self) -> bool
Checks whether this is CaretEqual.
pub fn as_caret_equal(&self) -> Option<&CaretEqual>
pub fn as_caret_equal(&self) -> Option<&CaretEqual>
Returns Some with a reference to CaretEqual, otherwise None.
pub fn is_colon_colon(&self) -> bool
pub fn is_colon_colon(&self) -> bool
Checks whether this is ColonColon.
pub fn as_colon_colon(&self) -> Option<&ColonColon>
pub fn as_colon_colon(&self) -> Option<&ColonColon>
Returns Some with a reference to ColonColon, otherwise None.
pub fn is_dimension(&self) -> bool
pub fn is_dimension(&self) -> bool
Checks whether this is Dimension.
pub fn as_dimension(&self) -> Option<&Dimension<'s>>
pub fn as_dimension(&self) -> Option<&Dimension<'s>>
pub fn is_dollar_equal(&self) -> bool
pub fn is_dollar_equal(&self) -> bool
Checks whether this is DollarEqual.
pub fn as_dollar_equal(&self) -> Option<&DollarEqual>
pub fn as_dollar_equal(&self) -> Option<&DollarEqual>
Returns Some with a reference to DollarEqual, otherwise None.
pub fn is_dollar_l_brace_var(&self) -> bool
pub fn is_dollar_l_brace_var(&self) -> bool
Checks whether this is DollarLBraceVar.
pub fn as_dollar_l_brace_var(&self) -> Option<&DollarLBraceVar<'s>>
pub fn as_dollar_l_brace_var(&self) -> Option<&DollarLBraceVar<'s>>
Returns Some with a reference to DollarLBraceVar, otherwise None.
pub fn is_dollar_var(&self) -> bool
pub fn is_dollar_var(&self) -> bool
Checks whether this is DollarVar.
pub fn as_dollar_var(&self) -> Option<&DollarVar<'s>>
pub fn as_dollar_var(&self) -> Option<&DollarVar<'s>>
pub fn is_dot_dot_dot(&self) -> bool
pub fn is_dot_dot_dot(&self) -> bool
Checks whether this is DotDotDot.
pub fn as_dot_dot_dot(&self) -> Option<&DotDotDot>
pub fn as_dot_dot_dot(&self) -> Option<&DotDotDot>
pub fn is_equal_equal(&self) -> bool
pub fn is_equal_equal(&self) -> bool
Checks whether this is EqualEqual.
pub fn as_equal_equal(&self) -> Option<&EqualEqual>
pub fn as_equal_equal(&self) -> Option<&EqualEqual>
Returns Some with a reference to EqualEqual, otherwise None.
pub fn is_exclamation(&self) -> bool
pub fn is_exclamation(&self) -> bool
Checks whether this is Exclamation.
pub fn as_exclamation(&self) -> Option<&Exclamation>
pub fn as_exclamation(&self) -> Option<&Exclamation>
Returns Some with a reference to Exclamation, otherwise None.
pub fn is_exclamation_equal(&self) -> bool
pub fn is_exclamation_equal(&self) -> bool
Checks whether this is ExclamationEqual.
pub fn as_exclamation_equal(&self) -> Option<&ExclamationEqual>
pub fn as_exclamation_equal(&self) -> Option<&ExclamationEqual>
Returns Some with a reference to ExclamationEqual, otherwise None.
pub fn is_greater_than(&self) -> bool
pub fn is_greater_than(&self) -> bool
Checks whether this is GreaterThan.
pub fn as_greater_than(&self) -> Option<&GreaterThan>
pub fn as_greater_than(&self) -> Option<&GreaterThan>
Returns Some with a reference to GreaterThan, otherwise None.
pub fn is_greater_than_equal(&self) -> bool
pub fn is_greater_than_equal(&self) -> bool
Checks whether this is GreaterThanEqual.
pub fn as_greater_than_equal(&self) -> Option<&GreaterThanEqual>
pub fn as_greater_than_equal(&self) -> Option<&GreaterThanEqual>
Returns Some with a reference to GreaterThanEqual, otherwise None.
pub fn is_hash_l_brace(&self) -> bool
pub fn is_hash_l_brace(&self) -> bool
Checks whether this is HashLBrace.
pub fn as_hash_l_brace(&self) -> Option<&HashLBrace>
pub fn as_hash_l_brace(&self) -> Option<&HashLBrace>
Returns Some with a reference to HashLBrace, otherwise None.
pub fn is_l_brace(&self) -> bool
pub fn is_l_brace(&self) -> bool
Checks whether this is LBrace.
pub fn is_l_bracket(&self) -> bool
pub fn is_l_bracket(&self) -> bool
Checks whether this is LBracket.
pub fn as_l_bracket(&self) -> Option<&LBracket>
pub fn as_l_bracket(&self) -> Option<&LBracket>
pub fn is_less_than(&self) -> bool
pub fn is_less_than(&self) -> bool
Checks whether this is LessThan.
pub fn as_less_than(&self) -> Option<&LessThan>
pub fn as_less_than(&self) -> Option<&LessThan>
pub fn is_less_than_equal(&self) -> bool
pub fn is_less_than_equal(&self) -> bool
Checks whether this is LessThanEqual.
pub fn as_less_than_equal(&self) -> Option<&LessThanEqual>
pub fn as_less_than_equal(&self) -> Option<&LessThanEqual>
Returns Some with a reference to LessThanEqual, otherwise None.
pub fn is_linebreak(&self) -> bool
pub fn is_linebreak(&self) -> bool
Checks whether this is Linebreak.
pub fn as_linebreak(&self) -> Option<&Linebreak>
pub fn as_linebreak(&self) -> Option<&Linebreak>
pub fn is_l_paren(&self) -> bool
pub fn is_l_paren(&self) -> bool
Checks whether this is LParen.
pub fn is_number_sign(&self) -> bool
pub fn is_number_sign(&self) -> bool
Checks whether this is NumberSign.
pub fn as_number_sign(&self) -> Option<&NumberSign>
pub fn as_number_sign(&self) -> Option<&NumberSign>
Returns Some with a reference to NumberSign, otherwise None.
pub fn is_percent(&self) -> bool
pub fn is_percent(&self) -> bool
Checks whether this is Percent.
pub fn as_percent(&self) -> Option<&Percent>
pub fn as_percent(&self) -> Option<&Percent>
pub fn is_percentage(&self) -> bool
pub fn is_percentage(&self) -> bool
Checks whether this is Percentage.
pub fn as_percentage(&self) -> Option<&Percentage<'s>>
pub fn as_percentage(&self) -> Option<&Percentage<'s>>
Returns Some with a reference to Percentage, otherwise None.
pub fn is_placeholder(&self) -> bool
pub fn is_placeholder(&self) -> bool
Checks whether this is Placeholder.
pub fn as_placeholder(&self) -> Option<&Placeholder<'s>>
pub fn as_placeholder(&self) -> Option<&Placeholder<'s>>
Returns Some with a reference to Placeholder, otherwise None.
pub fn is_plus_underscore(&self) -> bool
pub fn is_plus_underscore(&self) -> bool
Checks whether this is PlusUnderscore.
pub fn as_plus_underscore(&self) -> Option<&PlusUnderscore>
pub fn as_plus_underscore(&self) -> Option<&PlusUnderscore>
Returns Some with a reference to PlusUnderscore, otherwise None.
pub fn is_question(&self) -> bool
pub fn is_question(&self) -> bool
Checks whether this is Question.
pub fn as_question(&self) -> Option<&Question>
pub fn as_question(&self) -> Option<&Question>
pub fn is_r_brace(&self) -> bool
pub fn is_r_brace(&self) -> bool
Checks whether this is RBrace.
pub fn is_r_bracket(&self) -> bool
pub fn is_r_bracket(&self) -> bool
Checks whether this is RBracket.
pub fn as_r_bracket(&self) -> Option<&RBracket>
pub fn as_r_bracket(&self) -> Option<&RBracket>
pub fn is_r_paren(&self) -> bool
pub fn is_r_paren(&self) -> bool
Checks whether this is RParen.
pub fn is_semicolon(&self) -> bool
pub fn is_semicolon(&self) -> bool
Checks whether this is Semicolon.
pub fn as_semicolon(&self) -> Option<&Semicolon>
pub fn as_semicolon(&self) -> Option<&Semicolon>
pub fn is_solidus(&self) -> bool
pub fn is_solidus(&self) -> bool
Checks whether this is Solidus.
pub fn as_solidus(&self) -> Option<&Solidus>
pub fn as_solidus(&self) -> Option<&Solidus>
pub fn is_str_template(&self) -> bool
pub fn is_str_template(&self) -> bool
Checks whether this is StrTemplate.
pub fn as_str_template(&self) -> Option<&StrTemplate<'s>>
pub fn as_str_template(&self) -> Option<&StrTemplate<'s>>
Returns Some with a reference to StrTemplate, otherwise None.
pub fn is_tilde_equal(&self) -> bool
pub fn is_tilde_equal(&self) -> bool
Checks whether this is TildeEqual.
pub fn as_tilde_equal(&self) -> Option<&TildeEqual>
pub fn as_tilde_equal(&self) -> Option<&TildeEqual>
Returns Some with a reference to TildeEqual, otherwise None.
pub fn is_url_raw(&self) -> bool
pub fn is_url_raw(&self) -> bool
Checks whether this is UrlRaw.
pub fn as_url_raw(&self) -> Option<&UrlRaw<'s>>
pub fn as_url_raw(&self) -> Option<&UrlRaw<'s>>
pub fn is_url_template(&self) -> bool
pub fn is_url_template(&self) -> bool
Checks whether this is UrlTemplate.
pub fn as_url_template(&self) -> Option<&UrlTemplate<'s>>
pub fn as_url_template(&self) -> Option<&UrlTemplate<'s>>
Returns Some with a reference to UrlTemplate, otherwise None.