A strongly-typed identifier for a 7-bit request ID with a nullable state.
Public Member Functions | |
std::byte | asByte () const |
Returns the byte corresponding to this ID. | |
uint8_t | asInt () const |
Returns the int value of this ID. | |
bool | operator== (RequestID other) const |
Equality operator. | |
bool | operator!= (RequestID other) const |
Inequality operator. |
Static Public Member Functions | |
static std::optional< RequestID > | create (uint8_t v) |
Constructs a RequestID if the provided value is valid, i.e. | |
static std::optional< RequestID > | create (std::byte value) |
Constructs a RequestID if the provided value is valid, i.e. |
|
inlinestatic |
|
inlinestatic |
|
inline |
Returns the byte corresponding to this ID.
|
inline |
Returns the int value of this ID.
|
inline |
Equality operator.
Referenced by operator!=().
|
inline |
Inequality operator.
References operator==().