Euphoria
eu::Result< T, Error > Struct Template Reference

#include <result.h>

Public Types

using Self = Result< T, Error >
 

Public Member Functions

const T & get_value () const
 
const Error & get_error () const
 
 operator bool () const
 
const T & operator* () const
 

Static Public Member Functions

static Self create_value (const T &t)
 
static Self create_error (const Error &error)
 

Detailed Description

template<typename T, typename Error = std::string>
struct eu::Result< T, Error >

Definition at line 10 of file result.h.

Member Typedef Documentation

◆ Self

template<typename T , typename Error = std::string>
using eu::Result< T, Error >::Self = Result<T, Error>

Definition at line 12 of file result.h.

Member Function Documentation

◆ create_error()

template<typename T , typename Error = std::string>
static Self eu::Result< T, Error >::create_error ( const Error &  error)
inlinestatic

Definition at line 21 of file result.h.

◆ create_value()

template<typename T , typename Error = std::string>
static Self eu::Result< T, Error >::create_value ( const T &  t)
inlinestatic

Definition at line 15 of file result.h.

◆ get_error()

template<typename T , typename Error = std::string>
const Error& eu::Result< T, Error >::get_error ( ) const
inline

Definition at line 36 of file result.h.

◆ get_value()

template<typename T , typename Error = std::string>
const T& eu::Result< T, Error >::get_value ( ) const
inline

Definition at line 30 of file result.h.

◆ operator bool()

template<typename T , typename Error = std::string>
eu::Result< T, Error >::operator bool ( ) const
inline

Definition at line 41 of file result.h.

◆ operator*()

template<typename T , typename Error = std::string>
const T& eu::Result< T, Error >::operator* ( ) const
inline

Definition at line 48 of file result.h.


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