AWS SDK for C++  1.8.95
AWS SDK for C++
Public Types | Public Member Functions | Friends | List of all members
Aws::Utils::Outcome< R, E > Class Template Reference

#include <AccessAnalyzerClient.h>

Public Types

template<bool B, class T = void>
using enable_if_t = typename std::enable_if< B, T >::type
 

Public Member Functions

 Outcome ()
 
 Outcome (const R &r)
 
 Outcome (const E &e)
 
 Outcome (R &&r)
 
 Outcome (E &&e)
 
 Outcome (const Outcome &o)
 
template<typename RT , typename ET , enable_if_t< std::is_convertible< RT, R >::value &&std::is_convertible< ET, E >::value, int > = 0>
 Outcome (Outcome< RT, ET > &&o)
 
template<typename RT , typename ET , enable_if_t< std::is_convertible< RT, R >::value &&!std::is_convertible< ET, E >::value, int > = 0>
 Outcome (Outcome< RT, ET > &&o)
 
template<typename RT , typename ET , enable_if_t<!std::is_convertible< RT, R >::value &&std::is_convertible< ET, E >::value, int > = 0>
 Outcome (Outcome< RT, ET > &&o)
 
template<typename ET , enable_if_t< std::is_convertible< ET, E >::value, int > = 0>
 Outcome (ET &&e)
 
Outcomeoperator= (const Outcome &o)
 
 Outcome (Outcome &&o)
 
Outcomeoperator= (Outcome &&o)
 
const R & GetResult () const
 
R & GetResult ()
 
R && GetResultWithOwnership ()
 
const E & GetError () const
 
template<typename T >
GetError ()
 
bool IsSuccess () const
 

Friends

template<typename RT , typename ET >
class Outcome
 

Detailed Description

template<typename R, typename E>
class Aws::Utils::Outcome< R, E >

Template class representing the outcome of making a request. It will contain either a successful result or the failure error. The caller must check whether the outcome of the request was a success before attempting to access the result or the error.

Definition at line 43 of file AccessAnalyzerClient.h.

Member Typedef Documentation

◆ enable_if_t

template<typename R , typename E >
template<bool B, class T = void>
using Aws::Utils::Outcome< R, E >::enable_if_t = typename std::enable_if<B,T>::type

Definition at line 59 of file Outcome.h.

Constructor & Destructor Documentation

◆ Outcome() [1/11]

template<typename R , typename E >
Aws::Utils::Outcome< R, E >::Outcome ( )
inline

Definition at line 29 of file Outcome.h.

◆ Outcome() [2/11]

template<typename R , typename E >
Aws::Utils::Outcome< R, E >::Outcome ( const R &  r)
inline

Definition at line 32 of file Outcome.h.

◆ Outcome() [3/11]

template<typename R , typename E >
Aws::Utils::Outcome< R, E >::Outcome ( const E &  e)
inline

Definition at line 35 of file Outcome.h.

◆ Outcome() [4/11]

template<typename R , typename E >
Aws::Utils::Outcome< R, E >::Outcome ( R &&  r)
inline

Definition at line 38 of file Outcome.h.

◆ Outcome() [5/11]

template<typename R , typename E >
Aws::Utils::Outcome< R, E >::Outcome ( E &&  e)
inline

Definition at line 41 of file Outcome.h.

◆ Outcome() [6/11]

template<typename R , typename E >
Aws::Utils::Outcome< R, E >::Outcome ( const Outcome< R, E > &  o)
inline

Definition at line 44 of file Outcome.h.

◆ Outcome() [7/11]

template<typename R , typename E >
template<typename RT , typename ET , enable_if_t< std::is_convertible< RT, R >::value &&std::is_convertible< ET, E >::value, int > = 0>
Aws::Utils::Outcome< R, E >::Outcome ( Outcome< RT, ET > &&  o)
inline

Definition at line 65 of file Outcome.h.

◆ Outcome() [8/11]

template<typename R , typename E >
template<typename RT , typename ET , enable_if_t< std::is_convertible< RT, R >::value &&!std::is_convertible< ET, E >::value, int > = 0>
Aws::Utils::Outcome< R, E >::Outcome ( Outcome< RT, ET > &&  o)
inline

Definition at line 75 of file Outcome.h.

◆ Outcome() [9/11]

template<typename R , typename E >
template<typename RT , typename ET , enable_if_t<!std::is_convertible< RT, R >::value &&std::is_convertible< ET, E >::value, int > = 0>
Aws::Utils::Outcome< R, E >::Outcome ( Outcome< RT, ET > &&  o)
inline

Definition at line 85 of file Outcome.h.

◆ Outcome() [10/11]

template<typename R , typename E >
template<typename ET , enable_if_t< std::is_convertible< ET, E >::value, int > = 0>
Aws::Utils::Outcome< R, E >::Outcome ( ET &&  e)
inline

Definition at line 93 of file Outcome.h.

◆ Outcome() [11/11]

template<typename R , typename E >
Aws::Utils::Outcome< R, E >::Outcome ( Outcome< R, E > &&  o)
inline

Definition at line 109 of file Outcome.h.

Member Function Documentation

◆ GetError() [1/2]

template<typename R , typename E >
const E& Aws::Utils::Outcome< R, E >::GetError ( ) const
inline

Definition at line 147 of file Outcome.h.

◆ GetError() [2/2]

template<typename R , typename E >
template<typename T >
T Aws::Utils::Outcome< R, E >::GetError ( )
inline

Definition at line 153 of file Outcome.h.

◆ GetResult() [1/2]

template<typename R , typename E >
const R& Aws::Utils::Outcome< R, E >::GetResult ( ) const
inline

Definition at line 128 of file Outcome.h.

◆ GetResult() [2/2]

template<typename R , typename E >
R& Aws::Utils::Outcome< R, E >::GetResult ( )
inline

Definition at line 133 of file Outcome.h.

◆ GetResultWithOwnership()

template<typename R , typename E >
R&& Aws::Utils::Outcome< R, E >::GetResultWithOwnership ( )
inline

casts the underlying result to an r-value so that caller can take ownership of underlying resources. this is necessary when streams are involved.

Definition at line 142 of file Outcome.h.

◆ IsSuccess()

template<typename R , typename E >
bool Aws::Utils::Outcome< R, E >::IsSuccess ( ) const
inline

Definition at line 158 of file Outcome.h.

◆ operator=() [1/2]

template<typename R , typename E >
Outcome& Aws::Utils::Outcome< R, E >::operator= ( const Outcome< R, E > &  o)
inline

Definition at line 97 of file Outcome.h.

◆ operator=() [2/2]

template<typename R , typename E >
Outcome& Aws::Utils::Outcome< R, E >::operator= ( Outcome< R, E > &&  o)
inline

Definition at line 116 of file Outcome.h.

Friends And Related Function Documentation

◆ Outcome

template<typename R , typename E >
template<typename RT , typename ET >
friend class Outcome
friend

Definition at line 52 of file Outcome.h.


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