[][src]Trait select::predicate::Predicate

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

fn matches(&self, node: &Node) -> bool

Loading content...

Provided methods

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

Loading content...

Implementors

impl Predicate for Any[src]

impl Predicate for Comment[src]

impl Predicate for Element[src]

impl Predicate for Text[src]

impl<'a> Predicate for Attr<&'a str, &'a str>[src]

impl<'a> Predicate for Attr<&'a str, ()>[src]

impl<'a> Predicate for Class<&'a str>[src]

impl<'a> Predicate for Name<&'a str>[src]

impl<A: Predicate, B: Predicate> Predicate for And<A, B>[src]

impl<A: Predicate, B: Predicate> Predicate for Child<A, B>[src]

impl<A: Predicate, B: Predicate> Predicate for Descendant<A, B>[src]

impl<A: Predicate, B: Predicate> Predicate for Or<A, B>[src]

impl<F: Fn(&Node) -> bool> Predicate for F[src]

Matches if the function returns true.

impl<T: Predicate> Predicate for Not<T>[src]

Loading content...