Struct predicates::path::BinaryFilePredicate[][src]

pub struct BinaryFilePredicate { /* fields omitted */ }

Predicate that compares file matches

Methods

impl BinaryFilePredicate
[src]

Creates a new Predicate that ensures complete equality

Examples

use std::path::Path;
use predicates::prelude::*;

let predicate_file = predicate::path::eq_file(Path::new("Cargo.toml")).utf8().unwrap();
assert_eq!(true, predicate_file.eval(Path::new("Cargo.toml")));
assert_eq!(false, predicate_file.eval(Path::new("Cargo.lock")));
assert_eq!(false, predicate_file.eval(Path::new("src")));

assert_eq!(false, predicate_file.eval("Not a real Cargo.toml file content"));

Trait Implementations

impl Debug for BinaryFilePredicate
[src]

Formats the value using the given formatter. Read more

impl Clone for BinaryFilePredicate
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for BinaryFilePredicate
[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 BinaryFilePredicate
[src]

impl Predicate<Path> for BinaryFilePredicate
[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 Predicate<[u8]> for BinaryFilePredicate
[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 BinaryFilePredicate
[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 BinaryFilePredicate
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations