Trait predicates::name::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,