MCPcopy Index your code
hub / github.com/assert-rs/assert_fs / IntoPathPredicate

Interface IntoPathPredicate

src/assert.rs:178–187  ·  view source on GitHub ↗

Used by [`PathAssert`] to convert Self into the needed [`predicates_core::Predicate `]. # Examples ```rust 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(); ```

Source from the content-addressed store, hash-verified

176/// temp.close().unwrap();
177/// ```
178pub trait IntoPathPredicate<P>
179where
180 P: predicates_core::Predicate<path::Path>,
181{
182 /// The type of the predicate being returned.
183 type Predicate;
184
185 /// Convert to a predicate for testing a path.
186 fn into_path(self) -> P;
187}
188
189impl<P> IntoPathPredicate<P> for P
190where

Callers

nothing calls this directly

Implementers 1

assert.rssrc/assert.rs

Calls

no outgoing calls

Tested by

no test coverage detected