pub trait SelectorExt {
// Required methods
fn match_against_selectors<'a>(
&self,
selectors: impl IntoIterator<Item = &'a Selector>,
) -> impl Iterator<Item = Result<&'a Selector, Error>>;
fn match_against_selectors_and_tree_name<'a>(
&self,
tree_name: &str,
selectors: impl IntoIterator<Item = &'a Selector>,
) -> impl Iterator<Item = &'a Selector>;
fn match_against_component_selectors<'a, S>(
&self,
selectors: &'a [S],
) -> Result<Vec<&'a ComponentSelector>, Error>
where S: Borrow<ComponentSelector>;
fn into_component_selector(self) -> ComponentSelector;
fn matches_selector(&self, selector: &Selector) -> Result<bool, Error>;
fn matches_component_selector(
&self,
selector: &ComponentSelector,
) -> Result<bool, Error>;
fn sanitized(&self) -> String;
}
Required Methods§
fn match_against_selectors<'a>( &self, selectors: impl IntoIterator<Item = &'a Selector>, ) -> impl Iterator<Item = Result<&'a Selector, Error>>
Sourcefn match_against_selectors_and_tree_name<'a>(
&self,
tree_name: &str,
selectors: impl IntoIterator<Item = &'a Selector>,
) -> impl Iterator<Item = &'a Selector>
fn match_against_selectors_and_tree_name<'a>( &self, tree_name: &str, selectors: impl IntoIterator<Item = &'a Selector>, ) -> impl Iterator<Item = &'a Selector>
Invalid selectors are filtered out.
fn match_against_component_selectors<'a, S>(
&self,
selectors: &'a [S],
) -> Result<Vec<&'a ComponentSelector>, Error>where
S: Borrow<ComponentSelector>,
fn into_component_selector(self) -> ComponentSelector
fn matches_selector(&self, selector: &Selector) -> Result<bool, Error>
fn matches_component_selector( &self, selector: &ComponentSelector, ) -> Result<bool, Error>
fn sanitized(&self) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.