Skip to main content

SelectorError

Enum SelectorError 

Source
pub enum SelectorError<'i> {
Show 22 variants BadValueInAttr(Token<'i>), ClassNeedsIdent(Token<'i>), DanglingCombinator, EmptySelector, ExpectedBarInAttr(Token<'i>), ExpectedNamespace(CowArcStr<'i>), ExplicitNamespaceUnexpectedToken(Token<'i>), InvalidPseudoClassAfterPseudoElement, InvalidPseudoClassAfterWebKitScrollbar, InvalidPseudoClassBeforeWebKitScrollbar, InvalidQualNameInAttr(Token<'i>), InvalidState, MissingNestingPrefix, MissingNestingSelector, NoQualifiedNameInAttributeSelector(Token<'i>), PseudoElementExpectedIdent(Token<'i>), UnexpectedIdent(CowArcStr<'i>), UnexpectedTokenInAttributeSelector(Token<'i>), UnsupportedPseudoClass(CowArcStr<'i>), UnsupportedPseudoElement(CowArcStr<'i>), AmbiguousCssModuleClass(CowArcStr<'i>), UnexpectedSelectorAfterPseudoElement(Token<'i>),
}
Expand description

A selector parsing error.

Variants§

§

BadValueInAttr(Token<'i>)

An unexpected token was found in an attribute selector.

§

ClassNeedsIdent(Token<'i>)

An unexpected token was found in a class selector.

§

DanglingCombinator

A dangling combinator was found.

§

EmptySelector

An empty selector.

§

ExpectedBarInAttr(Token<'i>)

A | was expected in an attribute selector.

§

ExpectedNamespace(CowArcStr<'i>)

A namespace was expected.

§

ExplicitNamespaceUnexpectedToken(Token<'i>)

An unexpected token was encountered in a namespace.

§

InvalidPseudoClassAfterPseudoElement

An invalid pseudo class was encountered after a pseudo element.

§

InvalidPseudoClassAfterWebKitScrollbar

An invalid pseudo class was encountered after a -webkit-scrollbar pseudo element.

§

InvalidPseudoClassBeforeWebKitScrollbar

A -webkit-scrollbar state was encountered before a -webkit-scrollbar pseudo element.

§

InvalidQualNameInAttr(Token<'i>)

Invalid qualified name in attribute selector.

§

InvalidState

The current token is not allowed in this state.

§

MissingNestingPrefix

The selector is required to have the & nesting selector at the start.

§

MissingNestingSelector

The selector is missing a & nesting selector.

§

NoQualifiedNameInAttributeSelector(Token<'i>)

No qualified name in attribute selector.

§

PseudoElementExpectedIdent(Token<'i>)

An Invalid token was encountered in a pseudo element.

§

UnexpectedIdent(CowArcStr<'i>)

An unexpected identifier was encountered.

§

UnexpectedTokenInAttributeSelector(Token<'i>)

An unexpected token was encountered inside an attribute selector.

§

UnsupportedPseudoClass(CowArcStr<'i>)

An unsupported pseudo class was encountered.

§

UnsupportedPseudoElement(CowArcStr<'i>)

An unsupported pseudo element was encountered.

§

AmbiguousCssModuleClass(CowArcStr<'i>)

Ambiguous CSS module class.

§

UnexpectedSelectorAfterPseudoElement(Token<'i>)

An unexpected token was encountered after a pseudo element.

Trait Implementations§

Source§

impl<'i> Clone for SelectorError<'i>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'i> Debug for SelectorError<'i>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'i> Display for SelectorError<'i>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'i> From<SelectorParseErrorKind<'i>> for SelectorError<'i>

Source§

fn from(err: SelectorParseErrorKind<'i>) -> Self

Converts to this type from the input type.
Source§

impl<'any, 'i> IntoOwned<'any> for SelectorError<'i>

Available on crate feature into_owned only.
Source§

fn into_owned(self) -> Self::Owned

Consumes the value and returns an owned clone.

Source§

type Owned = SelectorError<'any>

A variant of Self with a new lifetime.
Source§

impl<'i> PartialEq for SelectorError<'i>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'i> Serialize for SelectorError<'i>

Available on crate features nodejs or serde only.
Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'i> StructuralPartialEq for SelectorError<'i>

Auto Trait Implementations§

§

impl<'i> Freeze for SelectorError<'i>

§

impl<'i> RefUnwindSafe for SelectorError<'i>

§

impl<'i> Send for SelectorError<'i>

§

impl<'i> Sync for SelectorError<'i>

§

impl<'i> Unpin for SelectorError<'i>

§

impl<'i> UnsafeUnpin for SelectorError<'i>

§

impl<'i> UnwindSafe for SelectorError<'i>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.