UnwrapOrTrap

Trait UnwrapOrTrap 

Source
pub trait UnwrapOrTrap<T> {
    // Required method
    fn unwrap_or_trap(self) -> T;
}
Expand description

Unwraps a Result<T, String> or traps with the error message.

Required Methods§

Source

fn unwrap_or_trap(self) -> T

Returns the contained Ok(T) value, or traps with the contained error message.

§Panics

Traps the canister execution with the error string.

Implementations on Foreign Types§

Source§

impl<T, E: Display> UnwrapOrTrap<T> for Result<T, E>

Implementors§