Skip to main content

SelectorError

Enum SelectorError 

Source
pub enum SelectorError {
Show 21 variants bad_value_in_attr(Token), class_needs_ident(Token), dangling_combinator, empty_selector, expected_bar_in_attr(Token), expected_namespace(*const [u8]), explicit_namespace_unexpected_token(Token), invalid_pseudo_class_after_pseudo_element, invalid_pseudo_class_after_webkit_scrollbar, invalid_pseudo_class_before_webkit_scrollbar, invalid_qual_name_in_attr(Token), invalid_state, missing_nesting_prefix, missing_nesting_selector, no_qualified_name_in_attribute_selector(Token), pseudo_element_expected_ident(Token), unexpected_ident(*const [u8]), unexpected_token_in_attribute_selector(Token), unsupported_pseudo_class_or_element(*const [u8]), unexpected_selector_after_pseudo_element(Token), ambiguous_css_module_class(*const [u8]),
}
Expand description

A selector parsing error.

Variants§

§

bad_value_in_attr(Token)

An unexpected token was found in an attribute selector.

§

class_needs_ident(Token)

An unexpected token was found in a class selector.

§

dangling_combinator

A dangling combinator was found.

§

empty_selector

An empty selector.

§

expected_bar_in_attr(Token)

A | was expected in an attribute selector.

§

expected_namespace(*const [u8])

A namespace was expected.

§

explicit_namespace_unexpected_token(Token)

An unexpected token was encountered in a namespace.

§

invalid_pseudo_class_after_pseudo_element

An invalid pseudo class was encountered after a pseudo element.

§

invalid_pseudo_class_after_webkit_scrollbar

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

§

invalid_pseudo_class_before_webkit_scrollbar

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

§

invalid_qual_name_in_attr(Token)

Invalid qualified name in attribute selector.

§

invalid_state

The current token is not allowed in this state.

§

missing_nesting_prefix

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

§

missing_nesting_selector

The selector is missing a & nesting selector.

§

no_qualified_name_in_attribute_selector(Token)

No qualified name in attribute selector.

§

pseudo_element_expected_ident(Token)

An invalid token was encountered in a pseudo element.

§

unexpected_ident(*const [u8])

An unexpected identifier was encountered.

§

unexpected_token_in_attribute_selector(Token)

An unexpected token was encountered inside an attribute selector.

§

unsupported_pseudo_class_or_element(*const [u8])

An unsupported pseudo class or pseudo element was encountered.

§

unexpected_selector_after_pseudo_element(Token)

§

ambiguous_css_module_class(*const [u8])

Trait Implementations§

Source§

impl Display for SelectorError

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> AsCtxPtr for T
where T: ?Sized,

Source§

fn as_ctx_ptr(&self) -> *mut Self
where Self: Sized,

self’s address as *mut Self for deferred-task / scopeguard / ref_guard ctx slots. The closures/trampolines deref it as shared (&*p) — every method they reach is &self post-R-2, so no write provenance is required; the *mut spelling is purely to match the existing DerefOnDrop / HasAutoFlush / RefCount ABI.
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> 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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, <T as TryFrom<U>>::Error>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V