Octane API Client
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
result.h File Reference

Define type to represent the result, inspired by Rust's "Result". More...

#include <cassert>
#include <utility>
Include dependency graph for result.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  octane::Result< T_OK, T_Error >
 Wrapper class that bifurcates the values indicated by normal and quasi-normal states. More...
 
struct  octane::_
 Structure representing that it returns nothing. More...
 
class  octane::ok_t< T >
 Utility class that can be used when we only want to specify normal state types. More...
 
class  octane::error_t< T >
 Utility class that can be used when we only want to specify quasi-normal state types. More...
 

Namespaces

namespace  octane
 

Functions

template<typename T_OK >
decltype(auto) octane::ok (const T_OK &ok)
 Utility function used to construct normal state values. More...
 
template<typename T_OK >
decltype(auto) octane::ok (T_OK &&ok)
 Utility function used to construct normal state values. More...
 
template<typename T_OK = _>
ok_t< _ > octane::ok ()
 Utitlity function used when the normal state type is _. More...
 
template<typename T_Error , size_t N>
decltype(auto) octane::error (const T_Error(&error)[N])
 Utility function used to construct quasi-normal state values. More...
 
template<typename T_Error >
decltype(auto) octane::error (const T_Error &error)
 Utility function to construct quasi-normal state values. More...
 
template<typename T_Error >
decltype(auto) octane::err (T_Error &&error)
 Utility function to construct quasi-normal state values. More...
 

Detailed Description

Define type to represent the result, inspired by Rust's "Result".

Author
cosocaf (cosoc.nosp@m.af@g.nosp@m.mail..nosp@m.com)
Version
0.1
Date
2022-09-01