Trait ckb_types::prelude::ShouldBeOk [−][src]
pub trait ShouldBeOk<T> {
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
fn 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.