pub enum Selector {
Simple(SimpleSelector),
}
Variants§
Simple(SimpleSelector)
Implementations§
Source§impl Selector
impl Selector
Sourcepub fn specificity(&self) -> Option<Specificity>
pub fn specificity(&self) -> Option<Specificity>
Computes the specificity of a CSS selector as defined by the W3C specification.
Returns the count of ID, class, and tag name selectors in a Selector::Simple
.
If the selector is not a Selector::Simple
, returns None
.
Trait Implementations§
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnwindSafe for Selector
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