Struct assert_fs::assert::StrPathPredicate
source · Expand description
Keep predicates
concrete Predicates out of our public API.
predicates_core::Predicate used by IntoPathPredicate
for str
predicates.
Example
use assert_fs::prelude::*;
use predicates::prelude::*;
let temp = assert_fs::TempDir::new().unwrap();
let input_file = temp.child("foo.txt");
input_file.touch().unwrap();
// ... do something with input_file ...
input_file.assert(predicate::str::is_empty()); // Uses StrPathPredicate
temp.close().unwrap();
Trait Implementations
sourceimpl<P: Clone + Predicate<str>> Clone for StrPathPredicate<P>
impl<P: Clone + Predicate<str>> Clone for StrPathPredicate<P>
sourcefn clone(&self) -> StrPathPredicate<P>
fn clone(&self) -> StrPathPredicate<P>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<P> Display for StrPathPredicate<P>where
P: Predicate<str>,
impl<P> Display for StrPathPredicate<P>where
P: Predicate<str>,
sourceimpl<P> IntoPathPredicate<StrPathPredicate<P>> for Pwhere
P: Predicate<str>,
impl<P> IntoPathPredicate<StrPathPredicate<P>> for Pwhere
P: Predicate<str>,
type Predicate = StrPathPredicate<P>
type Predicate = StrPathPredicate<P>
The type of the predicate being returned.
sourceimpl<P> PredicateReflection for StrPathPredicate<P>where
P: Predicate<str>,
impl<P> PredicateReflection for StrPathPredicate<P>where
P: Predicate<str>,
Auto Trait Implementations
impl<P> RefUnwindSafe for StrPathPredicate<P>where
P: RefUnwindSafe,
impl<P> Send for StrPathPredicate<P>where
P: Send,
impl<P> Sync for StrPathPredicate<P>where
P: Sync,
impl<P> Unpin for StrPathPredicate<P>where
P: Unpin,
impl<P> UnwindSafe for StrPathPredicate<P>where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<P> IntoPathPredicate<P> for Pwhere
P: Predicate<Path>,
impl<P> IntoPathPredicate<P> for Pwhere
P: Predicate<Path>,
type Predicate = P
type Predicate = P
The type of the predicate being returned.
sourcefn into_path(self) -> <P as IntoPathPredicate<P>>::Predicate
fn into_path(self) -> <P as IntoPathPredicate<P>>::Predicate
Convert to a predicate for testing a path.
sourceimpl<P, Item> PredicateBooleanExt<Item> for Pwhere
P: Predicate<Item>,
Item: ?Sized,
impl<P, Item> PredicateBooleanExt<Item> for Pwhere
P: Predicate<Item>,
Item: ?Sized,
sourcefn 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 moresourcefn or<B>(self, other: B) -> OrPredicate<Self, B, Item>where
B: Predicate<Item>,
Self: Sized,
fn or<B>(self, other: B) -> OrPredicate<Self, B, Item>where
B: Predicate<Item>,
Self: Sized,
Compute the logical OR of two
Predicate
results, returning the result. Read moresourcefn not(self) -> NotPredicate<Self, Item>where
Self: Sized,
fn not(self) -> NotPredicate<Self, Item>where
Self: Sized,
Compute the logical NOT of a
Predicate
, returning the result. Read more