[][src]Trait concordium_std::UnwrapAbort

pub trait UnwrapAbort {
    type Unwrap;
    pub fn unwrap_abort(self) -> Self::Unwrap;
}

Add optimized unwrap behaviour that aborts the process instead of panicking.

Associated Types

type Unwrap[src]

The underlying result type of the unwrap, in case of success.

Loading content...

Required methods

pub fn unwrap_abort(self) -> Self::Unwrap[src]

Unwrap or call trap. In contrast to the unwrap methods on Option::unwrap this method will tend to produce smaller code, at the cost of the ability to handle the panic. This is intended to be used only in Wasm code, where panics cannot be handled anyhow.

Loading content...

Implementations on Foreign Types

impl<A, E> UnwrapAbort for Result<A, E>[src]

type Unwrap = A

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

type Unwrap = A

Loading content...

Implementors

Loading content...