Trait Failure

Source
pub trait Failure {
    // Required methods
    fn command_fail(
        &mut self,
        callbacks: Vec<&dyn Fn() -> Result<ExitStatus, Error>>,
    ) -> &mut Self;
    fn fail(&mut self, callbacks: Vec<&dyn Fn() -> bool>) -> &mut Self;
}
Expand description

§Assertion to expect a failure

Required Methods§

Source

fn command_fail( &mut self, callbacks: Vec<&dyn Fn() -> Result<ExitStatus, Error>>, ) -> &mut Self

§Check if a command exit status is a failure code
  • callbacks The callbacks to check
Source

fn fail(&mut self, callbacks: Vec<&dyn Fn() -> bool>) -> &mut Self

§Check if a callbacks return false
  • callbacks The callbacks to check

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§