pub struct Selector(/* private fields */);
Expand description
A pre-compiled CSS Selector.
Implementations§
source§impl Selector
impl Selector
sourcepub fn matches(&self, element: &NodeDataRef<ElementData>) -> bool
pub fn matches(&self, element: &NodeDataRef<ElementData>) -> bool
Returns whether the given element matches this selector.
sourcepub fn specificity(&self) -> Specificity
pub fn specificity(&self) -> Specificity
Return the specificity of this selector.
Trait Implementations§
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