pub enum SelectorComponent {
Class(String),
Id(String),
Element(String),
Attribute(AttributeSelector),
PseudoClass(String),
PseudoElement(String),
Universal,
Combinator(CombinatorType),
Group(Vec<SelectorComponent>),
}Expand description
CSS selector component
Variants§
Class(String)
Class selector (.class)
Id(String)
ID selector (#id)
Element(String)
Element selector (div, span, etc.)
Attribute(AttributeSelector)
Attribute selector ([attr=“value”])
PseudoClass(String)
Pseudo-class (:hover, :focus)
PseudoElement(String)
Pseudo-element (::before, ::after)
Universal
Universal selector (*)
Combinator(CombinatorType)
Combinator (>, +, ~, space)
Group(Vec<SelectorComponent>)
Group of selectors
Trait Implementations§
Source§impl Clone for SelectorComponent
impl Clone for SelectorComponent
Source§fn clone(&self) -> SelectorComponent
fn clone(&self) -> SelectorComponent
Returns a duplicate 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 Debug for SelectorComponent
impl Debug for SelectorComponent
Source§impl<'de> Deserialize<'de> for SelectorComponent
impl<'de> Deserialize<'de> for SelectorComponent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for SelectorComponent
impl PartialEq for SelectorComponent
Source§impl Serialize for SelectorComponent
impl Serialize for SelectorComponent
impl StructuralPartialEq for SelectorComponent
Auto Trait Implementations§
impl Freeze for SelectorComponent
impl RefUnwindSafe for SelectorComponent
impl Send for SelectorComponent
impl Sync for SelectorComponent
impl Unpin for SelectorComponent
impl UnwindSafe for SelectorComponent
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