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

Stoppable outcome. More...

#include <Outcome.hpp>

Inheritance diagram for util::async::StoppableOutcome< RetType, StopSourceType >:
Collaboration diagram for util::async::StoppableOutcome< RetType, StopSourceType >:

Public Member Functions

StoppableOperation< RetType, StopSourceType > getOperation ()
 Gets the stoppable operation for this outcome.
 
StopSourceType & getStopSource ()
 Gets the stop source for this outcome.
 
- Public Member Functions inherited from util::async::impl::BasicOutcome< RetType >
 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
 

Additional Inherited Members

- Public Types inherited from util::async::impl::BasicOutcome< RetType >
using DataType = RetType
 
- Protected Attributes inherited from util::async::impl::BasicOutcome< RetType >
std::promise< RetType > promise_
 

Detailed Description

template<typename RetType, typename StopSourceType>
class util::async::StoppableOutcome< RetType, StopSourceType >

Stoppable outcome.

Template Parameters
RetTypeThe return type of the operation.
StopSourceTypeThe type of the stop source.

Member Function Documentation

◆ getOperation()

template<typename RetType , typename StopSourceType >
StoppableOperation< RetType, StopSourceType > util::async::StoppableOutcome< RetType, StopSourceType >::getOperation ( )
inlinenodiscard

Gets the stoppable operation for this outcome.

Returns
A stoppable operation for this outcome

◆ getStopSource()

template<typename RetType , typename StopSourceType >
StopSourceType & util::async::StoppableOutcome< RetType, StopSourceType >::getStopSource ( )
inlinenodiscard

Gets the stop source for this outcome.

Returns
The stop source

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