pub struct StrPathPredicate<P: Predicate<str>>(/* private fields */);
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§
Source§impl<P: Clone + Predicate<str>> Clone for StrPathPredicate<P>
impl<P: Clone + Predicate<str>> Clone for StrPathPredicate<P>
Source§fn clone(&self) -> StrPathPredicate<P>
fn clone(&self) -> StrPathPredicate<P>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P> Display for StrPathPredicate<P>
impl<P> Display for StrPathPredicate<P>
Source§impl<P> IntoPathPredicate<StrPathPredicate<P>> for P
impl<P> IntoPathPredicate<StrPathPredicate<P>> for P
Source§impl<P> Predicate<Path> for StrPathPredicate<P>
impl<P> Predicate<Path> for StrPathPredicate<P>
Source§impl<P> PredicateReflection for StrPathPredicate<P>
impl<P> PredicateReflection for StrPathPredicate<P>
Auto Trait Implementations§
impl<P> Freeze for StrPathPredicate<P>where
P: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> IntoPathPredicate<P> for P
impl<P> IntoPathPredicate<P> for P
Source§impl<P, Item> PredicateBooleanExt<Item> for P
impl<P, Item> PredicateBooleanExt<Item> for P
Source§fn and<B>(self, other: B) -> AndPredicate<Self, B, Item>
fn and<B>(self, other: B) -> AndPredicate<Self, B, Item>
Compute the logical AND of two
Predicate
results, returning the result. Read moreSource§fn or<B>(self, other: B) -> OrPredicate<Self, B, Item>
fn or<B>(self, other: B) -> OrPredicate<Self, B, Item>
Compute the logical OR of two
Predicate
results, returning the result. Read more