Struct assert_cmd::assert::InCodePredicate
source · [−]pub struct InCodePredicate(_);
Expand description
Keep predicates
concrete Predicates out of our public API.
predicates_core::Predicate used by IntoCodePredicate
for iterables of codes.
Example
use assert_cmd::prelude::*;
use std::process::Command;
Command::cargo_bin("bin_fixture")
.unwrap()
.env("exit", "42")
.assert()
.code(&[2, 42] as &[i32]);
Trait Implementations
sourceimpl Debug for InCodePredicate
impl Debug for InCodePredicate
sourceimpl Display for InCodePredicate
impl Display for InCodePredicate
sourceimpl IntoCodePredicate<InCodePredicate> for &'static [i32]
impl IntoCodePredicate<InCodePredicate> for &'static [i32]
type Predicate = InCodePredicate
type Predicate = InCodePredicate
The type of the predicate being returned.
sourceimpl IntoCodePredicate<InCodePredicate> for Vec<i32>
impl IntoCodePredicate<InCodePredicate> for Vec<i32>
type Predicate = InCodePredicate
type Predicate = InCodePredicate
The type of the predicate being returned.
sourceimpl Predicate<i32> for InCodePredicate
impl Predicate<i32> for InCodePredicate
sourceimpl PredicateReflection for InCodePredicate
impl PredicateReflection for InCodePredicate
Auto Trait Implementations
impl RefUnwindSafe for InCodePredicate
impl Send for InCodePredicate
impl Sync for InCodePredicate
impl Unpin for InCodePredicate
impl UnwindSafe for InCodePredicate
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> IntoCodePredicate<P> for Pwhere
P: Predicate<i32>,
impl<P> IntoCodePredicate<P> for Pwhere
P: Predicate<i32>,
type Predicate = P
type Predicate = P
The type of the predicate being returned.
sourcefn into_code(self) -> <P as IntoCodePredicate<P>>::Predicate
fn into_code(self) -> <P as IntoCodePredicate<P>>::Predicate
Convert to a predicate for testing a program’s exit code.
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>,
fn and<B>(self, other: B) -> AndPredicate<Self, B, Item>where
B: Predicate<Item>,
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>,
fn or<B>(self, other: B) -> OrPredicate<Self, B, Item>where
B: Predicate<Item>,
Compute the logical OR of two
Predicate
results, returning the result. Read moresourcefn not(self) -> NotPredicate<Self, Item>
fn not(self) -> NotPredicate<Self, Item>
Compute the logical NOT of a
Predicate
, returning the result. Read moresourceimpl<P, Item> PredicateBoxExt<Item> for Pwhere
P: Predicate<Item>,
impl<P, Item> PredicateBoxExt<Item> for Pwhere
P: Predicate<Item>,
sourceimpl<P, Item> PredicateNameExt<Item> for Pwhere
P: Predicate<Item>,
Item: ?Sized,
impl<P, Item> PredicateNameExt<Item> for Pwhere
P: Predicate<Item>,
Item: ?Sized,
sourcefn name(self, name: &'static str) -> NamePredicate<Self, Item>
fn name(self, name: &'static str) -> NamePredicate<Self, Item>
Name a predicate expression. Read more