Struct predicates::path::BinaryFilePredicate
[−]
[src]
pub struct BinaryFilePredicate { /* fields omitted */ }
Predicate that compares file matches
Methods
impl BinaryFilePredicate
[src]
pub fn utf8(self) -> Option<StrFilePredicate>
[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")));
Trait Implementations
impl Clone for BinaryFilePredicate
[src]
fn clone(&self) -> BinaryFilePredicate
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for BinaryFilePredicate
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Predicate<Path> for BinaryFilePredicate
[src]
fn eval(&self, path: &Path) -> bool
[src]
Execute this Predicate
against variable
, returning the resulting boolean. Read more