pub trait AssertResult {
// Required methods
fn is_ok(self) -> Self;
fn is_err(self) -> Self;
}Expand description
Assert whether a subject of the Result type holds some value or an error.
§Examples
use asserting::prelude::*;
let subject: Result<f64, String> = Ok(-3.14);
assert_that!(subject).is_ok();
let subject: Result<(), String> = Err("consequat sanctus ea exercitation".to_string());
assert_that!(subject).is_err();Required Methods§
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.