folly::coro::Generator

A synchronous coroutine generator that lazily yields a sequence of values.

Synopsis

Declared in <folly/coro/Generator.h>

template<typename T>
class Generator;

Types

NameDescription
iterator Input iterator over the values produced by the generator.
promise_type Coroutine promise type that drives a Generator and its nested children.

Member Functions

NameDescription
Generator [constructor]Constructors
~Generator [destructor]Destroys the generator and its underlying coroutine, if any.
operator= Assignment operators
begin Starts the generator and returns an iterator to the first element.
end Returns an iterator marking the end of the sequence.
swap Swaps the state of this generator with another.

Friends

NameDescription
folly::coro::Generator::promise_typeCoroutine promise type that drives a Generator and its nested children.
folly::coro::tag_invokeBuilds a Generator by invoking f with a... via co_invoke.

Non-Member Functions

NameDescription
swapSwaps the state of two generators.