62 return mResult.template is<T>();
80 static const T empty{};
106 static const Error empty_error(
"No error - result contains success value");
PromiseResult(const Error &error) FL_NO_EXCEPT
Construct an error PromiseResult.
fl::string error_message() const FL_NO_EXCEPT
Get the error message as a convenience.
PromiseResult(T &&value) FL_NO_EXCEPT
Construct a successful PromiseResult (move)
const Error & error() const FL_NO_EXCEPT
Get the error value.
fl::variant< T, Error > mResult
T & value() FL_NO_EXCEPT
Get the success value (mutable)
PromiseResult(Error &&error) FL_NO_EXCEPT
Construct an error PromiseResult (move)
bool ok() const FL_NO_EXCEPT
Check if the result is successful.
const fl::variant< T, Error > & variant() const FL_NO_EXCEPT
Access the underlying variant (for advanced usage)
const T & value() const FL_NO_EXCEPT
Get the success value (const)
PromiseResult(const T &value) FL_NO_EXCEPT
Construct a successful PromiseResult.
Result type for promise operations.
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
PromiseResult< T > make_error(const Error &error) FL_NO_EXCEPT
Helper function to create an error result.
PromiseResult< T > make_success(const T &value) FL_NO_EXCEPT
Helper function to create a successful result.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
constexpr int type_rank< T >::value
pair_element< I, T1, T2 >::type & get(pair< T1, T2 > &p) FL_NO_EXCEPT
Base definition for an LED controller.
Promise-based fluent API for FastLED - standalone async primitives.