[−][src]Macro nb::await
Await operation (won't work until the language gains support for generators)
This macro evaluates the expression $e
cooperatively yielding control
back to the (generator) caller whenever $e
evaluates to
Error::WouldBlock
.
Requirements
This macro must be called within a generator body.
Input
An expression $e
that evaluates to nb::Result<T, E>
Output
Ok(t)
if$e
evaluates toOk(t)
Err(e)
if$e
evaluates toErr(nb::Error::Other(e))