Struct predicates::path::BinaryFilePredicate [−][src]
pub struct BinaryFilePredicate { /* fields omitted */ }
Expand description
Predicate that compares file matches
Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for BinaryFilePredicate
impl Send for BinaryFilePredicate
impl Sync for BinaryFilePredicate
impl Unpin for BinaryFilePredicate
impl UnwindSafe for BinaryFilePredicate
Blanket Implementations
Mutably borrows from an owned value. Read more
fn and<B>(self, other: B) -> AndPredicate<Self, B, Item> where
B: Predicate<Item>,
Self: Sized,
fn and<B>(self, other: B) -> AndPredicate<Self, B, Item> where
B: Predicate<Item>,
Self: Sized,
Compute the logical AND of two Predicate
results, returning the result. Read more
Compute the logical OR of two Predicate
results, returning the result. Read more
Compute the logical NOT of a Predicate
, returning the result. Read more