Struct jsonrpc_core::middleware::Noop
source · pub struct Noop;
Expand description
No-op middleware implementation
Trait Implementations
sourceimpl<M: Metadata> Middleware<M> for Noop
impl<M: Metadata> Middleware<M> for Noop
type Future = Box<dyn Future<Item = Option<Response>, Error = ()> + Send + 'static, Global>
type Future = Box<dyn Future<Item = Option<Response>, Error = ()> + Send + 'static, Global>
A returned request future.
type CallFuture = Box<dyn Future<Item = Option<Output>, Error = ()> + Send + 'static, Global>
type CallFuture = Box<dyn Future<Item = Option<Output>, Error = ()> + Send + 'static, Global>
A returned call future.
sourcefn on_request<F, X>(
&self,
request: Request,
meta: M,
next: F
) -> Either<Self::Future, X>where
F: FnOnce(Request, M) -> X + Send,
X: Future<Item = Option<Response>, Error = ()> + Send + 'static,
fn on_request<F, X>(
&self,
request: Request,
meta: M,
next: F
) -> Either<Self::Future, X>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
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more