Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::async::impl::BasicOutcome< RetType > Class Template Reference

Base for all promise side of async operations. More...

#include <Outcome.hpp>

Inheritance diagram for util::async::impl::BasicOutcome< RetType >:

Public Types

using DataType = RetType

Public Member Functions

 BasicOutcome (BasicOutcome &&)=default
 BasicOutcome (BasicOutcome const &)=delete
void setValue (std::convertible_to< RetType > auto &&val)
 Sets the value on the inner promise
void setValue ()
 Sets the value channel for void operations.
std::future< RetType > getStdFuture ()
 Get the future for the inner promise

Protected Attributes

std::promise< RetType > promise_

Detailed Description

template<typename RetType>
class util::async::impl::BasicOutcome< RetType >

Base for all promise side of async operations.

Template Parameters
RetTypeThe return type of the operation.

Member Function Documentation

◆ getStdFuture()

template<typename RetType>
std::future< RetType > util::async::impl::BasicOutcome< RetType >::getStdFuture ( )
inlinenodiscard

Get the future for the inner promise

Returns
The standard future matching the inner promise

◆ setValue()

template<typename RetType>
void util::async::impl::BasicOutcome< RetType >::setValue ( std::convertible_to< RetType > auto && val)
inline

Sets the value on the inner promise

Parameters
valThe value to set

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