predicates::name

Trait PredicateNameExt

Source
pub trait PredicateNameExt<Item: ?Sized>
where Self: Predicate<Item>,
{ // Provided method fn name(self, name: &'static str) -> NamePredicate<Self, Item> where Self: Sized { ... } }
Expand description

Predicate extension that adds naming predicate expressions.

Provided Methods§

Source

fn name(self, name: &'static str) -> NamePredicate<Self, Item>
where Self: Sized,

Name a predicate expression.

§Examples
use predicates::prelude::*;

let predicate_fn = predicate::str::is_empty().not().name("non-empty");
println!("{}", predicate_fn);

Implementors§

Source§

impl<P, Item> PredicateNameExt<Item> for P
where P: Predicate<Item>, Item: ?Sized,