pub struct Matcher { /* private fields */ }
Expand description
CSS selector.
Implementations§
Source§impl Matcher
impl Matcher
Sourcepub fn new(
sel: &str,
) -> Result<Self, ParseError<'_, SelectorParseErrorKind<'_>>>
pub fn new( sel: &str, ) -> Result<Self, ParseError<'_, SelectorParseErrorKind<'_>>>
creates a new CSS matcher.
Sourcepub fn match_element<E>(&self, element: &E) -> boolwhere
E: Element<Impl = InnerSelector>,
pub fn match_element<E>(&self, element: &E) -> boolwhere
E: Element<Impl = InnerSelector>,
Checks if an element matches Matcher’s selection.
Sourcepub fn match_element_with_caches<E>(
&self,
element: &E,
caches: &mut SelectorCaches,
) -> boolwhere
E: Element<Impl = InnerSelector>,
pub fn match_element_with_caches<E>(
&self,
element: &E,
caches: &mut SelectorCaches,
) -> boolwhere
E: Element<Impl = InnerSelector>,
Checks if an element matches Matcher’s selection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Matcher
impl RefUnwindSafe for Matcher
impl Send for Matcher
impl Sync for Matcher
impl Unpin for Matcher
impl UnwindSafe for Matcher
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