Trait select::predicate::Predicate
[−]
[src]
pub trait Predicate { fn matches(&self, node: &Node) -> bool; fn or<T: Predicate>(self, other: T) -> Or<Self, T>
where
Self: Sized, { ... } fn and<T: Predicate>(self, other: T) -> And<Self, T>
where
Self: Sized, { ... } fn not(self) -> Not<Self>
where
Self: Sized, { ... } fn child<T: Predicate>(self, other: T) -> Child<Self, T>
where
Self: Sized, { ... } fn descendant<T: Predicate>(self, other: T) -> Descendant<Self, T>
where
Self: Sized, { ... } }
A trait implemented by all Node
matchers.
Required Methods
Provided Methods
fn or<T: Predicate>(self, other: T) -> Or<Self, T> where
Self: Sized,
Self: Sized,
fn and<T: Predicate>(self, other: T) -> And<Self, T> where
Self: Sized,
Self: Sized,
fn not(self) -> Not<Self> where
Self: Sized,
Self: Sized,
fn child<T: Predicate>(self, other: T) -> Child<Self, T> where
Self: Sized,
Self: Sized,
fn descendant<T: Predicate>(self, other: T) -> Descendant<Self, T> where
Self: Sized,
Self: Sized,
Implementors
impl Predicate for Any
impl<'a> Predicate for Name<&'a str>
impl<'a> Predicate for Class<&'a str>
impl<T: Predicate> Predicate for Not<T>
impl<'a> Predicate for Attr<&'a str, &'a str>
impl<'a> Predicate for Attr<&'a str, ()>
impl<F: Fn(&Node) -> bool> Predicate for F
impl Predicate for Element
impl Predicate for Text
impl Predicate for Comment
impl<A: Predicate, B: Predicate> Predicate for Or<A, B>
impl<A: Predicate, B: Predicate> Predicate for And<A, B>
impl<A: Predicate, B: Predicate> Predicate for Child<A, B>
impl<A: Predicate, B: Predicate> Predicate for Descendant<A, B>