Macro generator_ext::return_from_yield[][src]

macro_rules! return_from_yield {
    ($g:expr) => { ... };
}

This macro is used for the implementation of the Futerator trait. It advances a Generator, but returning the Yield variant of State, containing the Unit type if the Generator yielded. On return, you can bind the value to a value, like let ret = return_from_yield!(generator).