[−][src]Macro nb::try_nb
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
Ok(Async::NotReady)if$eevaluates toErr(nb::Error::WouldBlock)Err(e)if$eevaluates toErr(nb::Error::Other(e))
Output
t if $e evaluates to Ok(t)