37template<
typename R,
typename... Args>
50 TypedRpcBinding<R(Args...)> binding([
this, &responseSend](Args... cppArgs) -> R {
52 return mFn(responseSend, fl::forward<Args>(cppArgs)...);
55 return binding.invokeWithReturn(
args);
65template<
typename... Args>
78 TypedRpcBinding<void(Args...)> binding([
this, &responseSend](Args... cppArgs) ->
void {
80 mFn(responseSend, fl::forward<Args>(cppArgs)...);
Helper class for sending responses in async/streaming RPC methods.
ResponseAwareInvoker(fl::function< R(ResponseSend &, Args...)> fn, const fl::json &requestId, fl::function< void(const fl::json &)> responseSink)
fl::tuple< TypeConversionResult, json > invoke(const json &args) override
fl::function< R(ResponseSend &, Args...)> mFn
fl::function< void(const fl::json &)> mResponseSink
fl::function< void(const fl::json &)> mResponseSink
ResponseAwareInvoker(fl::function< void(ResponseSend &, Args...)> fn, const fl::json &requestId, fl::function< void(const fl::json &)> responseSink)
fl::tuple< TypeConversionResult, json > invoke(const json &args) override
fl::function< void(ResponseSend &, Args...)> mFn
FastLED's Elegant JSON Library: fl::json
Compile-time linker keep-alive hook for a single fl::Bus.
Invoker for response-aware RPC methods.
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
tuple< typename fl::decay< Ts >::type... > make_tuple(Ts &&... args) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
Base definition for an LED controller.