FastLED 3.9.15
|
Result type for promise operations with ok() semantics.
PromiseResult<T> provides a Rust-like Result type that wraps either a success value of type T or an Error. It provides convenient ok() checking and safe value access with assertions on misuse.
Definition in file promise_result.h.
Go to the source code of this file.
Classes | |
class | fl::result< T > |
Result type for promise operations. More... | |
Namespaces | |
namespace | fl |
IMPORTANT! | |
Typedefs | |
template<typename T> | |
using | fl::PromiseResult = result<T> |
Type alias for backwards compatibility. | |
Functions | |
template<typename T> | |
result< T > | fl::make_error (const char *message) |
Helper function to create an error result from C-string. | |
template<typename T> | |
result< T > | fl::make_error (const Error &error) |
Helper function to create an error result. | |
template<typename T> | |
result< T > | fl::make_error (const fl::string &message) |
Helper function to create an error result from string. | |
template<typename T> | |
result< T > | fl::make_error (Error &&error) |
Helper function to create an error result (move) | |
template<typename T> | |
result< T > | fl::make_success (const T &value) |
Helper function to create a successful result. | |
template<typename T> | |
result< T > | fl::make_success (T &&value) |
Helper function to create a successful result (move) | |