|
FastLED 3.9.15
|
Type trait to detect if a function signature has ResponseSend& as first parameter.
This trait is used to distinguish between:
For response-aware methods, the ResponseSend& parameter is stripped from the signature for JSON parameter matching:
EXAMPLE:
// Regular method int add(int a, int b) { return a + b; } // Signature for JSON matching: int(int, int)
// Response-aware async method void addAsync(ResponseSend& send, int a, int b) { send.send(json::object().set("result", a + b)); } // Signature for JSON matching: void(int, int) <- ResponseSend& stripped
Definition at line 44 of file response_aware_traits.h.
#include <response_aware_traits.h>
Inheritance diagram for fl::response_aware_signature< Sig >:Public Types | |
| using | signature = Sig |
Static Public Attributes | |
| static constexpr bool | is_response_aware = false |