Success, or the Error saying why not.
More...
#include <gui_core/gui_result.h>
|
| bool | HasValue () const |
| | True on success; same as the bool conversion.
|
| | operator bool () const |
| const Error & | GetError () const |
| | The error; a default Error on success.
|
| void | ValueOr (void fallback) const |
| | A copy of the value, or fallback when there is none.
|
| | Result ()=default |
| | Default-constructed is success; implicit from an Error for failure.
|
| | Result (Error error) |
| | Default-constructed is success; implicit from an Error for failure.
|
| void & | Value () |
| | The value; only valid when HasValue() (std::get throws otherwise).
|
| void & | operator* () |
| | The value; only valid when HasValue() (std::get throws otherwise).
|
| void * | operator-> () |
| | The value; only valid when HasValue() (std::get throws otherwise).
|
Success, or the Error saying why not.
◆ Result() [1/2]
Default-constructed is success; implicit from an Error for failure.
◆ Result() [2/2]
Default-constructed is success; implicit from an Error for failure.
◆ HasValue()
True on success; same as the bool conversion.
◆ operator bool()
◆ GetError()
The error; a default Error on success.
◆ Value()
The value; only valid when HasValue() (std::get throws otherwise).
◆ operator*()
The value; only valid when HasValue() (std::get throws otherwise).
◆ operator->()
The value; only valid when HasValue() (std::get throws otherwise).
◆ ValueOr()
A copy of the value, or fallback when there is none.
The documentation for this class was generated from the following file: