Module generator_ext::gen[][src]

Structs

Callable

A safe wrapper around a Generator. Once the Generator is returned, it's guaranteed that resume is never called again on the Generator.

Enums

State

Indicates the State of Generator. This Enum is used by functions and methods that advance a Generator.

Traits

Futerator

A Future generator. Resolves to 1 final value, but can be 'called' multiple times to advance the underlying Generator. Returns the Yield variant of State containing a (), to indicate the Generator has yielded. Only returns a Return if the Generator has returned. Any further calls to resume should return None.

Senerator

A Stream generator. On each call, the generator advances, and is supposed to yield a usable item. Returns the Yield variant of State with the yielded items of the Generator, and the Return variant of State when the Generator returns, with the returned item. Any further calls to resume_with_yield should return None.

Type Definitions

Futor

Future Generator type.

Senor

Streaming Generator type.