pub struct Selectors(pub Vec<Selector>);
Expand description
A pre-compiled list of CSS Selectors.
Tuple Fields§
§0: Vec<Selector>
Implementations§
source§impl Selectors
impl Selectors
sourcepub fn compile(s: &str) -> Result<Selectors, ()>
pub fn compile(s: &str) -> Result<Selectors, ()>
Compile a list of selectors. This may fail on syntax errors or unsupported selectors.
sourcepub fn matches(&self, element: &NodeDataRef<ElementData>) -> bool
pub fn matches(&self, element: &NodeDataRef<ElementData>) -> bool
Returns whether the given element matches this list of selectors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Selectors
impl RefUnwindSafe for Selectors
impl Send for Selectors
impl Sync for Selectors
impl Unpin for Selectors
impl UnwindSafe for Selectors
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