pub trait MapExpect<'a, T> {
// Required method
fn map_expect(self, msg: &'a str) -> T;
}Required Methods§
Sourcefn map_expect(self, msg: &'a str) -> T
fn map_expect(self, msg: &'a str) -> T
Calls expect(msg) on the mapped Result value. This is similar to map(Result::unwrap) but composes an expect call and message without requiring a closure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".