Trait concordium_std::ExpectReport[][src]

pub trait ExpectReport {
    type Unwrap;
    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.

Associated Types

Loading content...

Required methods

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

Expand description

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

Loading content...

Implementations on Foreign Types

impl<A, E: Debug> ExpectReport for Result<A, E>[src]

type Unwrap = A

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

impl<A> ExpectReport for Option<A>[src]

type Unwrap = A

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

Loading content...

Implementors

Loading content...