userver: utils::ResultStore< void > Class Reference
Loading...
Searching...
No Matches
utils::ResultStore< void > Class Referencefinal

#include <userver/utils/result_store.hpp>

Detailed Description

Simple void value/exception store

Definition at line 54 of file result_store.hpp.

Public Member Functions

void Retrieve ()
 Checks value availability or rethrows the stored exception.
 
void Get () const &
 
void SetValue () noexcept
 Marks the value as available.
 
void SetException (std::exception_ptr &&) noexcept
 Stores an exception.
 
std::exception_ptr GetException () const noexcept
 
void Retrieve ()
 Retrieves the stored value or rethrows the stored exception.
 
const void & Get () const &USERVER_IMPL_LIFETIME_BOUND
 Returns the stored value or rethrows the stored exception.
 
void SetValue (const void &)
 Stores a value.
 
void SetValue (void &&)
 Stores a value.
 
void SetException (std::exception_ptr &&) noexcept
 Stores an exception.
 
std::exception_ptr GetException () const noexcept
 

Member Function Documentation

◆ Get() [1/2]

void utils::ResultStore< void >::Get ( ) const &
inline

Definition at line 121 of file result_store.hpp.

◆ Get() [2/2]

const void & utils::ResultStore< void >::Get ( ) const &

Returns the stored value or rethrows the stored exception.

Exceptions
std::logic_errorif no value/exception stored

Definition at line 30 of file result_store.hpp.

◆ GetException() [1/2]

std::exception_ptr utils::ResultStore< void >::GetException ( ) const
noexcept

Definition at line 42 of file result_store.hpp.

◆ GetException() [2/2]

std::exception_ptr utils::ResultStore< void >::GetException ( ) const
inlinenoexcept

Definition at line 137 of file result_store.hpp.

◆ Retrieve() [1/2]

void utils::ResultStore< void >::Retrieve ( )

Retrieves the stored value or rethrows the stored exception.

Exceptions
std::logic_errorif no value/exception stored
Note
Can be called at most once.

Definition at line 26 of file result_store.hpp.

◆ Retrieve() [2/2]

void utils::ResultStore< void >::Retrieve ( )
inline

Checks value availability or rethrows the stored exception.

Exceptions
std::logic_errorif no value/exception stored

Definition at line 119 of file result_store.hpp.

◆ SetException() [1/2]

void utils::ResultStore< void >::SetException ( std::exception_ptr && exception)
noexcept

Stores an exception.

Definition at line 39 of file result_store.hpp.

◆ SetException() [2/2]

void utils::ResultStore< void >::SetException ( std::exception_ptr && exception)
inlinenoexcept

Stores an exception.

Definition at line 133 of file result_store.hpp.

◆ SetValue() [1/3]

void utils::ResultStore< void >::SetValue ( )
inlinenoexcept

Marks the value as available.

Definition at line 131 of file result_store.hpp.

◆ SetValue() [2/3]

void utils::ResultStore< void >::SetValue ( const void & value)

Stores a value.

Definition at line 33 of file result_store.hpp.

◆ SetValue() [3/3]

void utils::ResultStore< void >::SetValue ( void && value)

Stores a value.

Definition at line 36 of file result_store.hpp.


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