Trait casper_contract::unwrap_or_revert::UnwrapOrRevert [−][src]
A trait which provides syntactic sugar for unwrapping a type or calling
runtime::revert
if this fails. It is implemented for Result
and Option
.
Required methods
fn unwrap_or_revert(self) -> T
[src]
Unwraps the value into its inner type or calls runtime::revert
with a
predetermined error code on failure.
fn unwrap_or_revert_with<E: Into<ApiError>>(self, error: E) -> T
[src]
Unwraps the value into its inner type or calls runtime::revert
with the
provided error
on failure.