Boiled down my code to something simple. I cannot figure out how I can have an asynchronous decision on whether to return a response or continue on to rpc handlers using next
On this line: Either::Left(Box::pin(SampleMiddleware::process_async(request, meta, next))), I get:
the parameter type `F` may not live long enough
...so that the type `impl futures::Future<Output = std::option::Option<jsonrpc_core::Response>>` will meet its required lifetime bounds
consider adding an explicit lifetime bound...: `F: 'static`
Boiled down my code to something simple. I cannot figure out how I can have an asynchronous decision on whether to return a response or continue on to rpc handlers using
next
On this line:
Either::Left(Box::pin(SampleMiddleware::process_async(request, meta, next)))
, I get: