Struct jsonrpc_core::NoopMiddleware
[−]
[src]
pub struct NoopMiddleware;
No-op middleware implementation
Trait Implementations
impl Default for Noop
[src]
impl<M: Metadata> Middleware<M> for Noop
[src]
type Future = BoxFuture<Option<Response>, ()>
A returned future.
fn on_request<F, X>(
&self,
request: Request,
meta: M,
process: F
) -> Self::Future where
F: FnOnce(Request, M) -> X + Send,
X: Future<Item = Option<Response>, Error = ()> + Send + 'static,
&self,
request: Request,
meta: M,
process: F
) -> Self::Future where
F: FnOnce(Request, M) -> X + Send,
X: Future<Item = Option<Response>, Error = ()> + Send + 'static,
Method invoked on each request. Allows you to either respond directly (without executing RPC call) or do any additional work before and/or after processing the request. Read more