Trait IntoUtf8PathPredicate

Source
pub trait IntoUtf8PathPredicate<P>
where P: Predicate<Utf8Path>,
{ type Predicate; // Required method fn into_path(self) -> P; }
Available on crate feature assert only.
Expand description

Converts a type into the needed [Predicate<Utf8Path>].

§Examples

use camino_tempfile_ext::prelude::*;
use predicates::prelude::*;

let temp = Utf8TempDir::new().unwrap();

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

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

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 IntoUtf8PathPredicate<BytesContentPathPredicate> for &'static [u8]

Source§

impl IntoUtf8PathPredicate<StrContentPathPredicate> for &str

Source§

impl IntoUtf8PathPredicate<StrContentPathPredicate> for &String

Source§

impl IntoUtf8PathPredicate<StrContentPathPredicate> for String

Source§

impl<const N: usize> IntoUtf8PathPredicate<BytesContentPathPredicate> for &'static [u8; N]

Implementors§

Source§

impl<P> IntoUtf8PathPredicate<PathPredicate<P>> for P
where P: Predicate<Path>,

Source§

impl<P> IntoUtf8PathPredicate<StrPathPredicate<P>> for P
where P: Predicate<str>,

Source§

impl<P> IntoUtf8PathPredicate<P> for P
where P: Predicate<Utf8Path>,