selectors

Trait SelectorExt

Source
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§

Source

fn match_against_selectors<'a>( &self, selectors: impl IntoIterator<Item = &'a Selector>, ) -> impl Iterator<Item = Result<&'a Selector, Error>>

Source

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.

Source

fn match_against_component_selectors<'a, S>( &self, selectors: &'a [S], ) -> Result<Vec<&'a ComponentSelector>, Error>

Source

fn into_component_selector(self) -> ComponentSelector

Source

fn matches_selector(&self, selector: &Selector) -> Result<bool, Error>

Source

fn matches_component_selector( &self, selector: &ComponentSelector, ) -> Result<bool, Error>

Source

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.

Implementations on Foreign Types§

Source§

impl SelectorExt for ExtendedMoniker

Source§

fn match_against_selectors<'a>( &self, selectors: impl IntoIterator<Item = &'a Selector>, ) -> impl Iterator<Item = Result<&'a Selector, Error>>

Source§

fn match_against_selectors_and_tree_name<'a>( &self, tree_name: &str, selectors: impl IntoIterator<Item = &'a Selector>, ) -> impl Iterator<Item = &'a Selector>

Source§

fn match_against_component_selectors<'a, S>( &self, selectors: &'a [S], ) -> Result<Vec<&'a ComponentSelector>, Error>

Source§

fn matches_selector(&self, selector: &Selector) -> Result<bool, Error>

Source§

fn matches_component_selector( &self, selector: &ComponentSelector, ) -> Result<bool, Error>

Source§

fn sanitized(&self) -> String

Source§

fn into_component_selector(self) -> ComponentSelector

Source§

impl SelectorExt for Moniker

Source§

fn match_against_selectors<'a>( &self, selectors: impl IntoIterator<Item = &'a Selector>, ) -> impl Iterator<Item = Result<&'a Selector, Error>>

Source§

fn match_against_selectors_and_tree_name<'a>( &self, tree_name: &str, selectors: impl IntoIterator<Item = &'a Selector>, ) -> impl Iterator<Item = &'a Selector>

Source§

fn match_against_component_selectors<'a, S>( &self, selectors: &'a [S], ) -> Result<Vec<&'a ComponentSelector>, Error>

Source§

fn matches_selector(&self, selector: &Selector) -> Result<bool, Error>

Source§

fn matches_component_selector( &self, selector: &ComponentSelector, ) -> Result<bool, Error>

Source§

fn sanitized(&self) -> String

Source§

fn into_component_selector(self) -> ComponentSelector

Implementors§