Struct jsonrpc_core::middleware::Noop
source · pub struct Noop;
Expand description
No-op middleware implementation
Trait Implementations§
source§impl<M: Metadata> Middleware<M> for Noop
impl<M: Metadata> Middleware<M> for Noop
source§fn on_request<F, X>(
&self,
request: Request,
meta: M,
next: F
) -> Either<Self::Future, X> ⓘwhere
F: Fn(Request, M) -> X + Send + Sync,
X: Future<Output = Option<Response>> + Send + 'static,
fn on_request<F, X>( &self, request: Request, meta: M, next: F ) -> Either<Self::Future, X> ⓘwhere F: Fn(Request, M) -> X + Send + Sync, X: Future<Output = Option<Response>> + 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.
Auto Trait Implementations§
impl RefUnwindSafe for Noop
impl Send for Noop
impl Sync for Noop
impl Unpin for Noop
impl UnwindSafe for Noop
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more