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)>
Returns 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.
Auto Trait Implementations§
impl<'a> Freeze for SelectorErrorKind<'a>
impl<'a> RefUnwindSafe for SelectorErrorKind<'a>
impl<'a> !Send for SelectorErrorKind<'a>
impl<'a> !Sync for SelectorErrorKind<'a>
impl<'a> Unpin for SelectorErrorKind<'a>
impl<'a> UnwindSafe for SelectorErrorKind<'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