|
NAH 1.0.6
Native Application Host - Library API Reference
|
Result type for fallible operations. More...
#include <nahhost.hpp>
Public Member Functions | |
| E & | error () |
| const E & | error () const |
| template<typename F > | |
| auto | flatMap (F func) -> decltype(func(std::declval< T >())) |
| bool | isErr () const |
| bool | isOk () const |
| template<typename F > | |
| auto | map (F func) -> Result< decltype(func(std::declval< T >())), E > |
| T & | value () |
| const T & | value () const |
| T | valueOr (T default_value) const |
Static Public Member Functions | |
| static Result | err (E error) |
| static Result | ok (T value) |
Result type for fallible operations.
| T | The success value type |
| E | The error type (default: Error) |
Used throughout the NAH API for operations that can fail. Check isOk() before accessing value(), or isErr() before error().
Definition at line 109 of file nahhost.hpp.
Definition at line 112 of file nahhost.hpp.
Definition at line 119 of file nahhost.hpp.
Definition at line 120 of file nahhost.hpp.
Definition at line 136 of file nahhost.hpp.
Definition at line 115 of file nahhost.hpp.
Definition at line 114 of file nahhost.hpp.
Definition at line 128 of file nahhost.hpp.
Definition at line 111 of file nahhost.hpp.
Definition at line 117 of file nahhost.hpp.
Definition at line 118 of file nahhost.hpp.
|
inline |
Definition at line 122 of file nahhost.hpp.