Apache Mesos
Public Member Functions | Static Public Member Functions | List of all members
Result< T > Class Template Reference

#include <result.hpp>

Public Member Functions

 Result (const T &_t)
 
 Result (T &&_t)
 
template<typename U , typename = typename std::enable_if< std::is_constructible<T, const U&>::value>::type>
 Result (const U &u)
 
 Result (const Option< T > &option)
 
 Result (const Try< T > &_t)
 
 Result (const None &none)
 
template<typename U >
 Result (const _Some< U > &some)
 
 Result (const Error &error)
 
 Result (const ErrnoError &error)
 
 Result (const Result< T > &that)=default
 
 Result (Result &&that)=default
 
 ~Result ()=default
 
Result< T > & operator= (const Result< T > &that)=default
 
Result< T > & operator= (Result< T > &&that)=default
 
bool isSome () const
 
bool isNone () const
 
bool isError () const
 
const T & get () const
 
T & get ()
 
const T * operator-> () const
 
T * operator-> ()
 
const std::string & error () const
 

Static Public Member Functions

static Result< T > none ()
 
static Result< T > some (const T &t)
 
static Result< T > error (const std::string &message)
 

Constructor & Destructor Documentation

template<typename T>
Result< T >::Result ( const T &  _t)
inline
template<typename T>
Result< T >::Result ( T &&  _t)
inline
template<typename T>
template<typename U , typename = typename std::enable_if< std::is_constructible<T, const U&>::value>::type>
Result< T >::Result ( const U &  u)
inline
template<typename T>
Result< T >::Result ( const Option< T > &  option)
inline
template<typename T>
Result< T >::Result ( const Try< T > &  _t)
inline
template<typename T>
Result< T >::Result ( const None none)
inline
template<typename T>
template<typename U >
Result< T >::Result ( const _Some< U > &  some)
inline
template<typename T>
Result< T >::Result ( const Error error)
inline
template<typename T>
Result< T >::Result ( const ErrnoError error)
inline
template<typename T>
Result< T >::Result ( const Result< T > &  that)
default
template<typename T>
Result< T >::Result ( Result< T > &&  that)
default
template<typename T>
Result< T >::~Result ( )
default

Member Function Documentation

template<typename T>
static Result<T> Result< T >::error ( const std::string &  message)
inlinestatic
template<typename T>
const std::string& Result< T >::error ( ) const
inline
template<typename T>
const T& Result< T >::get ( ) const
inline
template<typename T>
T& Result< T >::get ( )
inline
template<typename T>
bool Result< T >::isError ( ) const
inline
template<typename T>
bool Result< T >::isNone ( ) const
inline
template<typename T>
bool Result< T >::isSome ( ) const
inline
template<typename T>
static Result<T> Result< T >::none ( )
inlinestatic
template<typename T>
const T* Result< T >::operator-> ( ) const
inline
template<typename T>
T* Result< T >::operator-> ( )
inline
template<typename T>
Result<T>& Result< T >::operator= ( const Result< T > &  that)
default
template<typename T>
Result<T>& Result< T >::operator= ( Result< T > &&  that)
default
template<typename T>
static Result<T> Result< T >::some ( const T &  t)
inlinestatic

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