Trait jsonrpc_core::Middleware [] [src]

pub trait Middleware<M: Metadata>: Send + Sync + 'static {
    fn on_request<F>(
        &self,
        request: Request,
        meta: M,
        next: F
    ) -> FutureResponse
    where
        F: FnOnce(Request, M) -> FutureResponse
; }

RPC middleware

Required Methods

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.

Implementors