Struct predicates::str::ContainsPredicate[][src]

pub struct ContainsPredicate { /* fields omitted */ }

Predicate that checks for patterns.

This is created by predicates::str:contains.

Methods

impl ContainsPredicate
[src]

Require a specific count of matches.

Examples

use predicates::prelude::*;

let predicate_fn = predicate::str::contains("Two").count(2);
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 ContainsPredicate
[src]

Formats the value using the given formatter. Read more

impl Clone for ContainsPredicate
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for ContainsPredicate
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for ContainsPredicate
[src]

impl Predicate<str> for ContainsPredicate
[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 ContainsPredicate
[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 ContainsPredicate
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations