COROIO: NNet::TPromise< T > Struct Template Reference
COROIO
 
All Classes Files Functions Variables Typedefs Pages
Loading...
Searching...
No Matches
NNet::TPromise< T > Struct Template Reference

Promise for coroutines that return a value of type T. More...

#include <corochain.hpp>

Inheritance diagram for NNet::TPromise< T >:
NNet::TPromiseBase< T >

Public Member Functions

TFuture< T > get_return_object ()
 
void return_value (const T &t)
 
void return_value (T &&t)
 
void unhandled_exception ()
 
- Public Member Functions inherited from NNet::TPromiseBase< T >
std::suspend_never initial_suspend ()
 
TFinalAwaiter< T > final_suspend () noexcept
 

Public Attributes

std::optional< std::variant< T, std::exception_ptr > > ErrorOr
 Optional container that holds either the result or an exception.
 
- Public Attributes inherited from NNet::TPromiseBase< T >
std::coroutine_handle Caller = std::noop_coroutine()
 Handle to the caller coroutine (initialized to a no-operation coroutine).
 

Detailed Description

template<typename T>
struct NNet::TPromise< T >

Promise for coroutines that return a value of type T.

Stores either the result of the coroutine or an exception pointer if an error occurs during execution.

Template Parameters
TThe type of the return value.

The documentation for this struct was generated from the following file: