|
LiveKit C++ Client SDK v1.1.0
Real-time audio/video/data SDK for C++
|
void specialization for operations that only report success or failure.
More...
#include <result.h>
Public Member Functions | |
| bool | ok () const noexcept |
| True when the operation succeeded. | |
| bool | hasError () const noexcept |
| True when the operation failed. | |
| operator bool () const noexcept | |
Allows if (result) style success checks. | |
| void | value () const |
| Validates success. | |
| E & | error () & |
| Access the error value. | |
| const E & | error () const & |
| Access the error value. | |
| E && | error () && |
| Move the error value out. | |
| const E && | error () const && |
| Move the error value out. | |
Static Public Member Functions | |
| static Result | success () |
| Construct a successful result with no payload. | |
| template<typename F = E, typename = std::enable_if_t<std::is_constructible<E, F&&>::value>> | |
| static Result | failure (F &&error) |
| Construct a failed result containing an error. | |
void specialization for operations that only report success or failure.
This keeps the same calling style as Result<T, E> without forcing callers to invent a dummy success payload.
|
inline |
Access the error value.
| std::logic_error | if hasError() == false. |
|
inline |
Move the error value out.
| std::logic_error | if hasError() == false. |
|
inline |
Access the error value.
| std::logic_error | if hasError() == false. |
|
inline |
Move the error value out.
| std::logic_error | if hasError() == false. |
|
inline |