|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Result type for operations that don't return a value. More...
#include <tmc51x0_result.hpp>
Public Member Functions | |
| Result () noexcept | |
| Construct a successful result. | |
| Result (ErrorCode error) noexcept | |
| Construct an error result. | |
| operator bool () const noexcept | |
| Check if result is OK (bool operator for cleaner syntax) | |
| bool | IsOk () const noexcept |
| Check if result is OK. | |
| bool | IsErr () const noexcept |
| Check if result is an error. | |
| ErrorCode | Error () const noexcept |
| Get the error code. | |
| const char * | ErrorMessage () const noexcept |
| Get human-readable error message. | |
Private Attributes | |
| ErrorCode | error_ |
Result type for operations that don't return a value.
Specialized version of Result<T> for void operations.
|
inlinenoexcept |
Construct a successful result.
|
inlineexplicitnoexcept |
Construct an error result.
|
inlinenoexcept |
Get the error code.
|
inlinenoexcept |
Get human-readable error message.
|
inlinenoexcept |
Check if result is an error.
|
inlinenoexcept |
Check if result is OK.
|
inlineexplicitnoexcept |
Check if result is OK (bool operator for cleaner syntax)
|
private |