FastLED 3.9.15
|
Promise-based fluent API for FastLED - standalone async primitives.
The fl::promise<T> API provides fluent .then() semantics that are intuitive and chainable for async operations in FastLED. This is a lightweight, standalone implementation that doesn't depend on fl::future.
Definition in file promise.h.
#include "fl/namespace.h"
#include "fl/function.h"
#include "fl/string.h"
#include "fl/shared_ptr.h"
#include "fl/move.h"
Go to the source code of this file.
Classes | |
class | fl::detail::PromiseImpl< T > |
Implementation class for promise - holds the actual state and logic. More... | |
struct | fl::Error |
Error type for promises. More... | |
class | fl::promise< T > |
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper around a shared PromiseImpl for easy copying/sharing. More... | |
Namespaces | |
namespace | fl |
IMPORTANT! | |
namespace | fl::detail |
Enumerations | |
enum class | fl::detail::PromiseState_t { fl::detail::PENDING , fl::detail::RESOLVED , fl::detail::REJECTED } |
State enumeration for promises. More... | |
Functions | |
template<typename T> | |
promise< T > | fl::make_rejected_promise (const char *error_message) |
Convenience function to create a rejected promise (const char* overload) | |
template<typename T> | |
promise< T > | fl::make_rejected_promise (const fl::string &error_message) |
Convenience function to create a rejected promise. | |
template<typename T> | |
promise< T > | fl::make_resolved_promise (T value) |
Convenience function to create a resolved promise. | |