hasValue
mach::Reply::hasValue
Indicates whether the reply contains a value.
Description
Section titled “Description”Returns whether the reply contains a value.
Syntax
Section titled “Syntax”[[nodiscard]] bool hasValue() const noexcept;Return Value
Section titled “Return Value”true if the reply contains a value; otherwise, false.
Exceptions
Section titled “Exceptions”This function is noexcept and does not throw exceptions.
Thread Safety
Section titled “Thread Safety”This function is thread-safe.
Example
Section titled “Example”if (reply.hasValue()) { const auto& value = reply.value();}See Also
Section titled “See Also”| Name | Description |
|---|---|
statusCode |
Returns the reply’s HTTP status code. |
value |
Returns the reply body. |