Struct assert_cmd::assert::StrOutputPredicate[][src]

pub struct StrOutputPredicate<P: Predicate<str>>(_);
Expand description

predicates_core::Predicate used by IntoOutputPredicate for [Predicate<str>].

Example

use assert_cmd::prelude::*;

use std::process::Command;
use predicates::prelude::*;

Command::cargo_bin("bin_fixture")
    .unwrap()
    .env("stdout", "hello")
    .env("stderr", "world")
    .assert()
    .stderr(predicate::str::similar("world\n"));

Trait Implementations

impl<P: Clone + Predicate<str>> Clone for StrOutputPredicate<P>[src]

fn clone(&self) -> StrOutputPredicate<P>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<P: Debug + Predicate<str>> Debug for StrOutputPredicate<P>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<P> Display for StrOutputPredicate<P> where
    P: Predicate<str>, 
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<P> IntoOutputPredicate<StrOutputPredicate<P>> for P where
    P: Predicate<str>, 
[src]

type Predicate = StrOutputPredicate<P>

The type of the predicate being returned.

fn into_output(self) -> Self::Predicate[src]

Convert to a predicate for testing a path.

impl<P> Predicate<[u8]> for StrOutputPredicate<P> where
    P: Predicate<str>, 
[src]

fn eval(&self, item: &[u8]) -> bool[src]

Execute this Predicate against variable, returning the resulting boolean. Read more

fn find_case<'a>(&'a self, expected: bool, variable: &[u8]) -> Option<Case<'a>>[src]

Find a case that proves this predicate as expected when run against variable.

impl<P> PredicateReflection for StrOutputPredicate<P> where
    P: Predicate<str>, 
[src]

fn children<'a>(&'a self) -> Box<dyn Iterator<Item = Child<'a>> + 'a>[src]

Nested Predicates of the current Predicate.

fn parameters<'a>(&'a self) -> Box<dyn Iterator<Item = Parameter<'a>> + 'a>[src]

Parameters of the current Predicate.

Auto Trait Implementations

impl<P> RefUnwindSafe for StrOutputPredicate<P> where
    P: RefUnwindSafe

impl<P> Send for StrOutputPredicate<P> where
    P: Send

impl<P> Sync for StrOutputPredicate<P> where
    P: Sync

impl<P> Unpin for StrOutputPredicate<P> where
    P: Unpin

impl<P> UnwindSafe for StrOutputPredicate<P> where
    P: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<P> IntoOutputPredicate<P> for P where
    P: Predicate<[u8]>, 
[src]

type Predicate = P

The type of the predicate being returned.

pub fn into_output(Self) -> <P as IntoOutputPredicate<P>>::Predicate[src]

Convert to a predicate for testing a path.

impl<P, Item> PredicateBooleanExt<Item> for P where
    P: Predicate<Item>,
    Item: ?Sized
[src]

fn and<B>(self, other: B) -> AndPredicate<Self, B, Item> where
    B: Predicate<Item>, 
[src]

Compute the logical AND of two Predicate results, returning the result. Read more

fn or<B>(self, other: B) -> OrPredicate<Self, B, Item> where
    B: Predicate<Item>, 
[src]

Compute the logical OR of two Predicate results, returning the result. Read more

fn not(self) -> NotPredicate<Self, Item>[src]

Compute the logical NOT of a Predicate, returning the result. Read more

impl<P, Item> PredicateBoxExt<Item> for P where
    P: Predicate<Item>, 
[src]

fn boxed(self) -> BoxPredicate<Item> where
    Self: Send + Sync + 'static, 
[src]

Returns a BoxPredicate wrapper around this Predicate type. Read more

impl<P> PredicateFileContentExt for P where
    P: Predicate<[u8]>, 
[src]

fn from_file_path(self) -> FileContentPredicate<Self>[src]

Returns a FileContentPredicate that adapts Self to a file content Predicate. Read more

impl<P, Item> PredicateNameExt<Item> for P where
    P: Predicate<Item>,
    Item: ?Sized
[src]

fn name(self, name: &'static str) -> NamePredicate<Self, Item>[src]

Name a predicate expression. Read more

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.