Agents 0.0.2
Edge AI Agents SDK
|
AsyncGenerator with a Folly-compatible API: next() returns Task<optional<T>> More...
#include <coroutine_utils.h>
Classes | |
struct | promise_type |
Promise type for AsyncGenerator. More... | |
Public Types | |
using | handle_type = std::coroutine_handle<promise_type> |
Handle type for AsyncGenerator. | |
Public Member Functions | |
AsyncGenerator () noexcept | |
Constructor with no handle. | |
AsyncGenerator (handle_type h) | |
Constructor with handle. | |
AsyncGenerator (AsyncGenerator &&other) noexcept | |
Constructor with other AsyncGenerator. | |
AsyncGenerator & | operator= (AsyncGenerator &&other) noexcept |
Operator= for AsyncGenerator. | |
AsyncGenerator (const AsyncGenerator &)=delete | |
AsyncGenerator & | operator= (const AsyncGenerator &)=delete |
Task< std::optional< T > > | next () |
Get the next item from the AsyncGenerator. | |
AsyncGenerator with a Folly-compatible API: next() returns Task<optional<T>>
|
inlineexplicit |
Constructor with handle.
h | The handle to use |
|
inlinenoexcept |
Constructor with other AsyncGenerator.
other | The other AsyncGenerator to use |
|
inline |
Get the next item from the AsyncGenerator.
|
inlinenoexcept |
Operator= for AsyncGenerator.
other | The other AsyncGenerator to use |