MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / IntoOutputPredicate

Interface IntoOutputPredicate

src/assert.rs:749–758  ·  view source on GitHub ↗

Used by [`Assert::stdout`] and [`Assert::stderr`] to convert Self into the needed [`predicates_core::Predicate<[u8]>`]. # Examples ```rust,no_run use assert_cmd::prelude::*; use std::process::Command; use predicates::prelude::*; Command::cargo_bin("bin_fixture") .unwrap() .env("stdout", "hello") .env("stderr", "world") .assert() .stdout(predicate::str::diff("hello\n").from_utf8()); // which c

Source from the content-addressed store, hash-verified

747/// .stdout("hello\n");
748/// ```
749pub trait IntoOutputPredicate<P>
750where
751 P: predicates_core::Predicate<[u8]>,
752{
753 /// The type of the predicate being returned.
754 type Predicate;
755
756 /// Convert to a predicate for testing a path.
757 fn into_output(self) -> P;
758}
759
760impl<P> IntoOutputPredicate<P> for P
761where

Callers

nothing calls this directly

Implementers 1

assert.rssrc/assert.rs

Calls

no outgoing calls

Tested by

no test coverage detected