pub trait ShouldBeOk<T> {
// Required method
fn should_be_ok(self) -> T;
}
Expand description
An alias of unwrap()
to mark where we are really have confidence to do unwrap.
We can also customize the panic message or do something else in this alias.
Required Methods§
Sourcefn should_be_ok(self) -> T
fn should_be_ok(self) -> T
Unwraps an Option
or a Result
with confidence and we assume that it’s impossible to fail.