Enum pest_css_parser::Selector
source · 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§
source§impl PartialEq<Selector> for Selector
impl PartialEq<Selector> for Selector
impl StructuralPartialEq for Selector
Auto Trait Implementations§
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