[][src]Macro nb::try_nb

macro_rules! try_nb {
    ($e:expr) => { ... };
}

Future adapter

This is a try operation from a nb::Result to a futures::Poll

Requirements

This macro must be called within a function / closure that has signature fn(..) -> futures::Poll<T, E>.

This macro requires that the futures crate is in the root of the crate.

Input

An expression $e that evaluates to nb::Result<T, E>

Early return

Output

t if $e evaluates to Ok(t)