Crate generator_ext[][src]

This crate is build for easy convertion from generators to iterators, and for chaining generators in different kinds of ways.

Modules

gen
iter

Macros

return_from_yield

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).

return_yielded

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).

yield_from

A macro that first yields all items in the provided Generator, gives the ability to bind the return value of the Generator to a variable.