ElementPredicate

Trait ElementPredicate 

Source
pub trait ElementPredicate {
    // Required method
    fn match_element(&self, e: &Element) -> bool;
}
Expand description

A predicate for matching elements.

The default implementations allow you to match by tag name or a tuple of tag name and namespace.

Required Methods§

Source

fn match_element(&self, e: &Element) -> bool

Implementations on Foreign Types§

Source§

impl ElementPredicate for String

Source§

fn match_element(&self, e: &Element) -> bool

Search by tag name

Source§

impl<'a> ElementPredicate for &'a str

Source§

fn match_element(&self, e: &Element) -> bool

Search by tag name

Source§

impl<'a> ElementPredicate for Cow<'a, str>

Source§

fn match_element(&self, e: &Element) -> bool

Search by tag name

Source§

impl<TN> ElementPredicate for (TN,)
where String: PartialEq<TN>,

Source§

impl<TN, NS> ElementPredicate for (TN, NS)
where String: PartialEq<TN> + PartialEq<NS>,

Source§

fn match_element(&self, e: &Element) -> bool

Search by a tuple of (tagname, namespace)

Implementors§