Enum rsass::css::SelectorPart
source · pub enum SelectorPart {
Simple(String),
Descendant,
RelOp(u8),
Attribute {
name: CssString,
op: String,
val: CssString,
modifier: Option<char>,
},
PseudoElement {
name: CssString,
arg: Option<Selectors>,
},
Pseudo {
name: CssString,
arg: Option<Selectors>,
},
BackRef,
}
Expand description
A selector consist of a sequence of these parts.
Variants§
Simple(String)
A simple selector, eg a class, id or element name.
Descendant
The empty relational operator.
The thing after this is a descendant of the thing before this.
RelOp(u8)
A relational operator; >
, +
, ~
.
Attribute
An attribute selector
Fields
PseudoElement
A css3 pseudo-element (::foo)
Fields
Pseudo
A pseudo-class or a css2 pseudo-element (:foo)
Fields
BackRef
A sass backref (&
), to be replaced with outer selector.
Trait Implementations§
source§impl Clone for SelectorPart
impl Clone for SelectorPart
source§fn clone(&self) -> SelectorPart
fn clone(&self) -> SelectorPart
Returns a copy 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 SelectorPart
impl Debug for SelectorPart
source§impl Display for SelectorPart
impl Display for SelectorPart
source§impl PartialEq for SelectorPart
impl PartialEq for SelectorPart
source§fn eq(&self, other: &SelectorPart) -> bool
fn eq(&self, other: &SelectorPart) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SelectorPart
impl PartialOrd for SelectorPart
source§fn partial_cmp(&self, other: &SelectorPart) -> Option<Ordering>
fn partial_cmp(&self, other: &SelectorPart) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for SelectorPart
impl StructuralPartialEq for SelectorPart
Auto Trait Implementations§
impl Freeze for SelectorPart
impl RefUnwindSafe for SelectorPart
impl Send for SelectorPart
impl Sync for SelectorPart
impl Unpin for SelectorPart
impl UnwindSafe for SelectorPart
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