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
, { ... } }
Expand description

A trait implemented by all Node matchers.

Required Methods§

Provided Methods§

Implementors§

Matches if the function returns true.