|
PF1550 Driver 0.1.0
API reference
|
The value of a call, or why there is none. More...
#include <pf1550_types.hpp>
Public Member Functions | |
| constexpr bool | ok () const noexcept |
| constexpr | operator bool () const noexcept |
Static Public Member Functions | |
| static constexpr Result | Success (T v) noexcept |
| A successful result. | |
| static constexpr Result | Failure (Error e) noexcept |
| A failed result. | |
Public Attributes | |
| T | value {} |
The value; T{} when the call failed. | |
| Error | error {Error::Ok} |
Error::Ok on success. | |
The value of a call, or why there is none.
Check ok() (or the bool conversion) before reading value; on failure value is T{}, with one documented exception: CheckChargerAgainstLimits() and the start-up check return the ChargerAsFound report in value together with OutOfLimits or Unsafe, because the report is what says why the charger is not covered.
| T | The value type. Result<void> carries only the error. |
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlinestaticconstexprnoexcept |