pub enum PseudoClass<'i> {
Show 48 variants Lang { languages: Vec<CowArcStr<'i>>, }, Dir { direction: Direction, }, Hover, Active, Focus, FocusVisible, FocusWithin, Current, Past, Future, Playing, Paused, Seeking, Buffering, Stalled, Muted, VolumeLocked, Fullscreen(VendorPrefix), Defined, AnyLink(VendorPrefix), Link, LocalLink, Target, TargetWithin, Visited, Enabled, Disabled, ReadOnly(VendorPrefix), ReadWrite(VendorPrefix), PlaceholderShown(VendorPrefix), Default, Checked, Indeterminate, Blank, Valid, Invalid, InRange, OutOfRange, Required, Optional, UserValid, UserInvalid, Autofill(VendorPrefix), Local { selector: Box<Selector<'i>>, }, Global { selector: Box<Selector<'i>>, }, WebKitScrollbar(WebKitScrollbarPseudoClass), Custom { name: CowArcStr<'i>, }, CustomFunction { name: CowArcStr<'i>, arguments: TokenList<'i>, },
}
Expand description

A pseudo class.

Variants§

§

Lang

Fields

§languages: Vec<CowArcStr<'i>>

A list of language codes.

The :lang() pseudo class.

§

Dir

Fields

§direction: Direction

A direction.

The :dir() pseudo class.

§

Hover

The :hover pseudo class.

§

Active

The :active pseudo class.

§

Focus

The :focus pseudo class.

§

FocusVisible

The :focus-visible pseudo class.

§

FocusWithin

The :focus-within pseudo class.

§

Current

The :current pseudo class.

§

Past

The :past pseudo class.

§

Future

The :future pseudo class.

§

Playing

The :playing pseudo class.

§

Paused

The :paused pseudo class.

§

Seeking

The :seeking pseudo class.

§

Buffering

The :buffering pseudo class.

§

Stalled

The :stalled pseudo class.

§

Muted

The :muted pseudo class.

§

VolumeLocked

The :volume-locked pseudo class.

§

Fullscreen(VendorPrefix)

The :fullscreen pseudo class.

§

Defined

The :defined pseudo class.

The :any-link pseudo class.

The :link pseudo class.

The :local-link pseudo class.

§

Target

The :target pseudo class.

§

TargetWithin

The :target-within pseudo class.

§

Visited

The :visited pseudo class.

§

Enabled

The :enabled pseudo class.

§

Disabled

The :disabled pseudo class.

§

ReadOnly(VendorPrefix)

The :read-only pseudo class.

§

ReadWrite(VendorPrefix)

The :read-write pseudo class.

§

PlaceholderShown(VendorPrefix)

The :placeholder-shown pseudo class.

§

Default

The :default pseudo class.

§

Checked

The :checked pseudo class.

§

Indeterminate

The :indeterminate pseudo class.

§

Blank

The :blank pseudo class.

§

Valid

The :valid pseudo class.

§

Invalid

The :invalid pseudo class.

§

InRange

The :in-range pseudo class.

§

OutOfRange

The :out-of-range pseudo class.

§

Required

The :required pseudo class.

§

Optional

The :optional pseudo class.

§

UserValid

The :user-valid pseudo class.

§

UserInvalid

The :used-invalid pseudo class.

§

Autofill(VendorPrefix)

The :autofill pseudo class.

§

Local

Fields

§selector: Box<Selector<'i>>

A local selector.

The CSS modules :local() pseudo class.

§

Global

Fields

§selector: Box<Selector<'i>>

A global selector.

The CSS modules :global() pseudo class.

§

WebKitScrollbar(WebKitScrollbarPseudoClass)

A webkit scrollbar pseudo class.

§

Custom

Fields

§name: CowArcStr<'i>

The pseudo class name.

An unknown pseudo class.

§

CustomFunction

Fields

§name: CowArcStr<'i>

The pseudo class name.

§arguments: TokenList<'i>

The arguments of the pseudo class function.

An unknown functional pseudo class.

Trait Implementations§

source§

impl<'i> Clone for PseudoClass<'i>

source§

fn clone(&self) -> PseudoClass<'i>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<'de: 'i, 'i> Deserialize<'de> for PseudoClass<'i>

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'i> JsonSchema for PseudoClass<'i>

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl<'i> NonTSPseudoClass<'i> for PseudoClass<'i>

§

type Impl = Selectors

The SelectorImpl this pseudo-element is used for.
source§

fn is_active_or_hover(&self) -> bool

Whether this pseudo-class is :active or :hover.
source§

fn is_user_action_state(&self) -> bool

Whether this pseudo-class belongs to: Read more
source§

fn is_valid_before_webkit_scrollbar(&self) -> bool

source§

fn is_valid_after_webkit_scrollbar(&self) -> bool

source§

fn visit<V>(&self, _visitor: &mut V) -> boolwhere V: SelectorVisitor<'i, Impl = Self::Impl>,

source§

impl<'i> PartialEq<PseudoClass<'i>> for PseudoClass<'i>

source§

fn eq(&self, other: &PseudoClass<'i>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'i> Serialize for PseudoClass<'i>

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> ToCss for PseudoClass<'i>

source§

fn to_css<W>(&self, _: &mut W) -> Resultwhere W: Write,

Serialize self in CSS syntax, writing to dest.
source§

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more
source§

impl<'i> StructuralPartialEq for PseudoClass<'i>

Auto Trait Implementations§

§

impl<'i> RefUnwindSafe for PseudoClass<'i>

§

impl<'i> Send for PseudoClass<'i>

§

impl<'i> Sync for PseudoClass<'i>

§

impl<'i> Unpin for PseudoClass<'i>

§

impl<'i> UnwindSafe for PseudoClass<'i>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

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

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 Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<T> DynClone for Twhere T: Clone,

source§

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

source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> ToOwned for Twhere T: Clone,

§

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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,