Result status with an error category and human-readable message.
More...
#include <src/include/libvirtualhid/types.hpp>
|
| ErrorCode | code () const |
| | Get the status error category.
|
| |
| const std::string & | message () const |
| | Get the human-readable status message.
|
| |
| bool | ok () const |
| | Check whether the operation succeeded.
|
| |
|
| OperationStatus () |
| | Construct a successful status.
|
| |
| | OperationStatus (ErrorCode code, std::string message) |
| | Construct a status with an explicit error code and message.
|
| |
Result status with an error category and human-readable message.
◆ OperationStatus()
| lvh::OperationStatus::OperationStatus |
( |
ErrorCode | code, |
|
|
std::string | message ) |
Construct a status with an explicit error code and message.
- Parameters
-
| code | Error category. |
| message | Human-readable status message. |
◆ code()
| ErrorCode lvh::OperationStatus::code |
( |
| ) |
const |
Get the status error category.
- Returns
- Error category.
◆ failure()
Create a failing status.
- Parameters
-
| code | Error category. |
| message | Human-readable failure message. |
- Returns
- Failing status object.
◆ message()
| const std::string & lvh::OperationStatus::message |
( |
| ) |
const |
Get the human-readable status message.
- Returns
- Human-readable status message.
◆ ok()
| bool lvh::OperationStatus::ok |
( |
| ) |
const |
Check whether the operation succeeded.
- Returns
true when the status is successful.
◆ success()
Create a successful status.
- Returns
- Successful status object.
The documentation for this class was generated from the following file: