NonTreeStructuralPseudoClass

Enum NonTreeStructuralPseudoClass 

Source
pub enum NonTreeStructuralPseudoClass {
Show 71 variants active, any(Option<VendorPrefix>, DeduplicatedSelectors), any_link(Option<VendorPrefix>), checked, default, dir(Option<VendorPrefix>, TextDirectionality), disabled, enabled, first, focus, focus_within, in_range, invalid, is(DeduplicatedSelectors), fullscreen(Option<VendorPrefix>), hover, indeterminate, lang(LanguageRanges), left, link, optional, out_of_range, placeholder_shown(Option<VendorPrefix>), read_only(Option<VendorPrefix>), read_write(Option<VendorPrefix>), required, right, target, valid, visited, where_(DeduplicatedSelectors), case_sensitive_type_attr(Option<VendorPrefix>, Atom), non_zero_border(Option<VendorPrefix>), broken(Option<VendorPrefix>), drag_over(Option<VendorPrefix>), first_node(Option<VendorPrefix>), focusring(Option<VendorPrefix>), full_screen_ancestor(Option<VendorPrefix>), handler_blocked(Option<VendorPrefix>), handler_crashed(Option<VendorPrefix>), handler_disabled(Option<VendorPrefix>), last_node(Option<VendorPrefix>), list_bullet(Option<VendorPrefix>), list_number(Option<VendorPrefix>), loading(Option<VendorPrefix>), locale_dir(Option<VendorPrefix>, TextDirectionality), lwtheme(Option<VendorPrefix>), lwtheme_brighttext(Option<VendorPrefix>), lwtheme_darktext(Option<VendorPrefix>), native_anonymous(Option<VendorPrefix>), only_whitespace(Option<VendorPrefix>), submit_invalid(Option<VendorPrefix>), suppressed(Option<VendorPrefix>), system_metric(Option<VendorPrefix>, SystemMetric), tree_cell(Option<VendorPrefix>), tree_cell_text(Option<VendorPrefix>, TreeHover), tree_checkbox(Option<VendorPrefix>), tree_column(Option<VendorPrefix>), tree_drop_feedback(Option<VendorPrefix>), tree_image(Option<VendorPrefix>), tree_indentation(Option<VendorPrefix>), tree_line(Option<VendorPrefix>), tree_progressmeter(Option<VendorPrefix>), tree_row(Option<VendorPrefix>, TreeHover), tree_separator(Option<VendorPrefix>), tree_twisty(Option<VendorPrefix>), ui_invalid(Option<VendorPrefix>), ui_valid(Option<VendorPrefix>), user_disabled(Option<VendorPrefix>), window_inactive(Option<VendorPrefix>), autofill(Option<VendorPrefix>),
}
Expand description

A non tree-structural pseudo-class. See https://drafts.csswg.org/selectors-4/#structural-pseudos

Variants§

§

active

§

any(Option<VendorPrefix>, DeduplicatedSelectors)

§

checked

§

default

§

dir(Option<VendorPrefix>, TextDirectionality)

§

disabled

§

enabled

§

first

Only valid in @page

§

focus

§

focus_within

§

in_range

§

invalid

§

is(DeduplicatedSelectors)

§

fullscreen(Option<VendorPrefix>)

§

hover

§

indeterminate

§

lang(LanguageRanges)

§

left

Only valid in @page

§

optional

§

out_of_range

§

placeholder_shown(Option<VendorPrefix>)

The obsolete (as of Firefox 51) :-moz-placeholder is re-written when parsed as this.

§

read_only(Option<VendorPrefix>)

§

read_write(Option<VendorPrefix>)

§

required

§

right

Only valid in @page

§

target

§

valid

§

visited

§

where_(DeduplicatedSelectors)

§

case_sensitive_type_attr(Option<VendorPrefix>, Atom)

-servo- only

§

non_zero_border(Option<VendorPrefix>)

-servo- only

§

broken(Option<VendorPrefix>)

-moz- only

§

drag_over(Option<VendorPrefix>)

-moz- only

§

first_node(Option<VendorPrefix>)

-moz- only

§

focusring(Option<VendorPrefix>)

-moz- only

§

full_screen_ancestor(Option<VendorPrefix>)

-moz- only

§

handler_blocked(Option<VendorPrefix>)

-moz- only

§

handler_crashed(Option<VendorPrefix>)

-moz- only

§

handler_disabled(Option<VendorPrefix>)

-moz- only

§

last_node(Option<VendorPrefix>)

-moz- only

§

list_bullet(Option<VendorPrefix>)

-moz- only

§

list_number(Option<VendorPrefix>)

-moz- only

§

loading(Option<VendorPrefix>)

-moz- only

§

locale_dir(Option<VendorPrefix>, TextDirectionality)

§

lwtheme(Option<VendorPrefix>)

-moz- only

§

lwtheme_brighttext(Option<VendorPrefix>)

-moz- only

§

lwtheme_darktext(Option<VendorPrefix>)

-moz- only

§

native_anonymous(Option<VendorPrefix>)

-moz- only

§

only_whitespace(Option<VendorPrefix>)

-moz- only

§

submit_invalid(Option<VendorPrefix>)

-moz- only

§

suppressed(Option<VendorPrefix>)

-moz- only

§

system_metric(Option<VendorPrefix>, SystemMetric)

-moz- only (not listed with other pseudo-classes)

§

tree_cell(Option<VendorPrefix>)

-moz- only

§

tree_cell_text(Option<VendorPrefix>, TreeHover)

-moz- only.

§

tree_checkbox(Option<VendorPrefix>)

-moz- only

§

tree_column(Option<VendorPrefix>)

-moz- only

§

tree_drop_feedback(Option<VendorPrefix>)

-moz- only

§

tree_image(Option<VendorPrefix>)

-moz- only

§

tree_indentation(Option<VendorPrefix>)

-moz- only

§

tree_line(Option<VendorPrefix>)

-moz- only

§

tree_progressmeter(Option<VendorPrefix>)

-moz- only

§

tree_row(Option<VendorPrefix>, TreeHover)

-moz- only.

§

tree_separator(Option<VendorPrefix>)

-moz- only

§

tree_twisty(Option<VendorPrefix>)

-moz- only

§

ui_invalid(Option<VendorPrefix>)

-moz- only

§

ui_valid(Option<VendorPrefix>)

-moz- only

§

user_disabled(Option<VendorPrefix>)

-moz- only

§

window_inactive(Option<VendorPrefix>)

-moz- only

§

autofill(Option<VendorPrefix>)

-webkit- only, with potential Mozilla support coming.

Implementations§

Source§

impl NonTreeStructuralPseudoClass

Source

pub fn is_attr_based(&self) -> bool

Returns true if the evaluation of the pseudo-class depends on the element’s attributes.

Source

pub fn is_safe_user_action_state(&self) -> bool

https://drafts.csswg.org/selectors-4/#useraction-pseudos

We intentionally skip the link-related ones.

Trait Implementations§

Source§

impl Clone for NonTreeStructuralPseudoClass

Source§

fn clone(&self) -> NonTreeStructuralPseudoClass

Returns a duplicate 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 Debug for NonTreeStructuralPseudoClass

Source§

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

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

impl NonTSPseudoClass for NonTreeStructuralPseudoClass

Source§

type Impl = OurSelectorImpl

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 visit<V>(&self, _visitor: &mut V) -> bool
where V: SelectorVisitor<Impl = Self::Impl>,

Source§

impl PartialEq for NonTreeStructuralPseudoClass

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToCss for NonTreeStructuralPseudoClass

Source§

fn to_css<W: Write>(&self, dest: &mut W) -> Result

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 Eq for NonTreeStructuralPseudoClass

Source§

impl StructuralPartialEq for NonTreeStructuralPseudoClass

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

Source§

type Error = Infallible

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.