pub enum SimpleSelector {
Tag(Tag),
UnknownTag(String),
Class(String, u64),
Id(String, u32),
Universal,
Attr(AttrSelector),
PseudoFirstChild,
PseudoLastChild,
PseudoNthChild {
a: i32,
b: i32,
},
PseudoNot(Box<CompoundSelector>),
}Expand description
A single simple selector.
Variants§
Tag(Tag)
Match by tag name: div, p, span.
UnknownTag(String)
Match by unknown/custom tag name, e.g. my-widget.
Class(String, u64)
Match by class: .class. Second field is precomputed 64-bit bloom bit.
Id(String, u32)
Match by id: #id. Second field is precomputed FNV-1a hash.
Universal
Universal selector: *.
Attr(AttrSelector)
Attribute selector: [attr], [attr=val], etc.
PseudoFirstChild
:first-child pseudo-class.
PseudoLastChild
:last-child pseudo-class.
PseudoNthChild
:nth-child(an+b) pseudo-class.
PseudoNot(Box<CompoundSelector>)
:not(selector) pseudo-class.
Trait Implementations§
Source§impl Clone for SimpleSelector
impl Clone for SimpleSelector
Source§fn clone(&self) -> SimpleSelector
fn clone(&self) -> SimpleSelector
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 moreAuto Trait Implementations§
impl Freeze for SimpleSelector
impl RefUnwindSafe for SimpleSelector
impl Send for SimpleSelector
impl Sync for SimpleSelector
impl Unpin for SimpleSelector
impl UnsafeUnpin for SimpleSelector
impl UnwindSafe for SimpleSelector
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