pub enum SelectorPart {
Simple(SassString),
Descendant,
RelOp(u8),
Attribute {
name: SassString,
op: String,
val: SassString,
modifier: Option<char>,
},
PseudoElement {
name: SassString,
arg: Option<Selectors>,
},
Pseudo {
name: SassString,
arg: Option<Selectors>,
},
BackRef,
}Expand description
A selector consist of a sequence of these parts.
Variants§
Simple(SassString)
A simple selector, eg a class, id or element name.
Note that a Simple selector can hide a more complex selector through string interpolation.
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
PseudoElement
A css3 pseudo-element (::foo)
Fields
§
name: SassStringThe name of the pseudo-element
Pseudo
A pseudo-class or a css2 pseudo-element (:foo)
Fields
§
name: SassStringThe name of the pseudo-class
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 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 SelectorPart
impl Debug for SelectorPart
Source§impl PartialEq for SelectorPart
impl PartialEq for SelectorPart
Source§impl PartialOrd for SelectorPart
impl PartialOrd for SelectorPart
impl 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