pub trait ExpectReport {
    type Unwrap;

    // Required method
    fn expect_report(self, msg: &str) -> Self::Unwrap;
}
Expand description

Analogue of the expect methods on types such as Option, but useful in a Wasm setting.

Required Associated Types§

Required Methods§

source

fn expect_report(self, msg: &str) -> Self::Unwrap

Like the default expect on, e.g., Result, but calling fail with the given message, instead of panic.

Implementations on Foreign Types§

source§

impl<A, E: Debug> ExpectReport for Result<A, E>

§

type Unwrap = A

source§

fn expect_report(self, msg: &str) -> Self::Unwrap

source§

impl<A> ExpectReport for Option<A>

§

type Unwrap = A

source§

fn expect_report(self, msg: &str) -> Self::Unwrap

Implementors§