Enum fast_scraper::error::SelectorErrorKind
source · pub enum SelectorErrorKind<'a> {
UnexpectedToken(Token<'a>),
EndOfLine,
InvalidAtRule(String),
InvalidAtRuleBody,
QualRuleInvalid,
ExpectedColonOnPseudoElement(Token<'a>),
ExpectedIdentityOnPseudoElement(Token<'a>),
UnexpectedSelectorParseError(SelectorParseErrorKind<'a>),
}
Expand description
Error type that is returned when calling Selector::parse
Variants§
UnexpectedToken(Token<'a>)
A Token
was not expected
EndOfLine
End-Of-Line was unexpected
InvalidAtRule(String)
@
rule is invalid
InvalidAtRuleBody
The body of an @
rule is invalid
QualRuleInvalid
The qualified rule is invalid
ExpectedColonOnPseudoElement(Token<'a>)
Expected a ::
for a pseudoelement
ExpectedIdentityOnPseudoElement(Token<'a>)
Expected an identity for a pseudoelement
UnexpectedSelectorParseError(SelectorParseErrorKind<'a>)
A SelectorParseErrorKind
error that isn’t really supposed to happen did
Trait Implementations§
source§impl<'a> Clone for SelectorErrorKind<'a>
impl<'a> Clone for SelectorErrorKind<'a>
source§fn clone(&self) -> SelectorErrorKind<'a>
fn clone(&self) -> SelectorErrorKind<'a>
Returns a copy 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<'a> Debug for SelectorErrorKind<'a>
impl<'a> Debug for SelectorErrorKind<'a>
source§impl<'a> Display for SelectorErrorKind<'a>
impl<'a> Display for SelectorErrorKind<'a>
source§impl<'a> Error for SelectorErrorKind<'a>
impl<'a> Error for SelectorErrorKind<'a>
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
source§impl<'a> From<BasicParseErrorKind<'a>> for SelectorErrorKind<'a>
impl<'a> From<BasicParseErrorKind<'a>> for SelectorErrorKind<'a>
source§fn from(err: BasicParseErrorKind<'a>) -> Self
fn from(err: BasicParseErrorKind<'a>) -> Self
Converts to this type from the input type.
source§impl<'a> From<ParseError<'a, SelectorParseErrorKind<'a>>> for SelectorErrorKind<'a>
impl<'a> From<ParseError<'a, SelectorParseErrorKind<'a>>> for SelectorErrorKind<'a>
source§fn from(original: ParseError<'a, SelectorParseErrorKind<'a>>) -> Self
fn from(original: ParseError<'a, SelectorParseErrorKind<'a>>) -> Self
Converts to this type from the input type.
source§impl<'a> From<SelectorParseErrorKind<'a>> for SelectorErrorKind<'a>
impl<'a> From<SelectorParseErrorKind<'a>> for SelectorErrorKind<'a>
source§fn from(err: SelectorParseErrorKind<'a>) -> Self
fn from(err: SelectorParseErrorKind<'a>) -> Self
Converts to this type from the input type.