Used by [`Assert::code`] to convert `Self` into the needed [`predicates_core::Predicate `]. # Examples ```rust,no_run use assert_cmd::prelude::*; use std::process::Command; use predicates::prelude::*; Command::cargo_bin("bin_fixture") .unwrap() .env("exit", "42") .assert() .code(predicate::eq(42)); // which can be shortened to: Command::cargo_bin("bin_fixture") .unwrap() .env("exit", "42"
| 553 | /// .code(42); |
| 554 | /// ``` |
| 555 | pub trait IntoCodePredicate<P> |
| 556 | where |
| 557 | P: predicates_core::Predicate<i32>, |
| 558 | { |
| 559 | /// The type of the predicate being returned. |
| 560 | type Predicate; |
| 561 | |
| 562 | /// Convert to a predicate for testing a program's exit code. |
| 563 | fn into_code(self) -> P; |
| 564 | } |
| 565 | |
| 566 | impl<P> IntoCodePredicate<P> for P |
| 567 | where |
nothing calls this directly
no outgoing calls
no test coverage detected