Trait ink_env::call::utils::Unwrap[][src]

pub trait Unwrap {
    type Output;
    fn unwrap_or_else<F>(self, f: F) -> Self::Output
    where
        F: FnOnce() -> Self::Output
; }

Implemented by Set and Unset in order to unwrap their value.

This is useful in case the use-site does not know if it is working with a set or an unset value generically unwrap it using a closure for fallback.

Associated Types

type Output[src]

The output type of the unwrap_or_else operation.

Loading content...

Required methods

fn unwrap_or_else<F>(self, f: F) -> Self::Output where
    F: FnOnce() -> Self::Output
[src]

Returns the set value or evaluates the given closure.

Loading content...

Implementors

impl<T> Unwrap for Set<T>[src]

type Output = T

impl<T> Unwrap for Unset<T>[src]

type Output = T

Loading content...