Struct predicates::str::RegexPredicate[][src]

pub struct RegexPredicate { /* fields omitted */ }

Predicate that uses regex matching

This is created by the predicate::str::is_match.

Methods

impl RegexPredicate
[src]

Require a specific count of matches.

Examples

use predicates::prelude::*;

let predicate_fn = predicate::str::is_match("T[a-z]*").unwrap().count(3);
assert_eq!(true, predicate_fn.eval("One Two Three Two One"));
assert_eq!(false, predicate_fn.eval("One Two Three"));

Trait Implementations

impl Debug for RegexPredicate
[src]

Formats the value using the given formatter. Read more

impl Clone for RegexPredicate
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Predicate<str> for RegexPredicate
[src]

Execute this Predicate against variable, returning the resulting boolean. Read more

Find a case that proves this predicate as expected when run against variable.

impl PredicateReflection for RegexPredicate
[src]

Important traits for Box<R>

Parameters of the current Predicate.

Important traits for Box<R>

Nested Predicates of the current Predicate.

impl Display for RegexPredicate
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations