Trait expect_exit::ExpectedResult[][src]

pub trait ExpectedResult<T> {
    fn expect_result_nb_(self, msg: &str) -> Result<T, ExpectationFailed>;
fn expect_result_(self, msg: &str) -> Result<T, Box<dyn Error>>;
fn expect_result_nb<F>(self, f: F) -> Result<T, ExpectationFailed>
    where
        F: FnOnce() -> String
;
fn expect_result<F>(self, f: F) -> Result<T, Box<dyn Error>>
    where
        F: FnOnce() -> String
; }
Expand description

Test the value and return a result object containing either the inner value or an error object that, when displayed, will provide the specified error message.

Required methods

Return a result object with a non-boxed Error object.

Return a result object that may be tested using the ? operator.

Return a result object with a non-boxed Error object. Invoke the specified function to obtain the error message.

Return a result object that may be tested using the ? operator. Invoke the specified function to obtain the error message.

Implementations on Foreign Types

Implementors