pub trait IntoPathPredicate<P>where
    P: Predicate<Path>,{
    type Predicate;

    // Required method
    fn into_path(self) -> P;
}
Expand description

Used by PathAssert to convert Self into the needed predicates_core::Predicate<Path>.

Examples

use std::path;

use assert_fs::prelude::*;
use predicates::prelude::*;

let temp = assert_fs::TempDir::new().unwrap();

// ... do something with input_file ...

temp.child("bar.txt").assert(predicate::path::missing()); // Uses IntoPathPredicate

temp.close().unwrap();

Required Associated Types§

source

type Predicate

The type of the predicate being returned.

Required Methods§

source

fn into_path(self) -> P

Convert to a predicate for testing a path.

Implementations on Foreign Types§

source§

impl IntoPathPredicate<StrContentPathPredicate> for String

source§

impl<'s> IntoPathPredicate<StrContentPathPredicate> for &'s String

source§

impl<'s> IntoPathPredicate<StrContentPathPredicate> for &'s str

source§

impl IntoPathPredicate<BytesContentPathPredicate> for &'static [u8]

Implementors§