Macro generator_ext::return_yielded [−][src]
macro_rules! return_yielded { ($g:expr) => { ... }; }
This macro is used for the implementation of the Senerator
trait.
It advances a Generator, but returning the Yield variant of State, with the yielded value if the Generator yielded.
On return, you can bind the value to a value, like let ret = return_yielded!(generator)
.