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 = NoopFuture
type Future = NoopFuture
A returned request future.
type CallFuture = NoopCallFuture
type CallFuture = NoopCallFuture
A returned call future.
sourcefn 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<Item = Option<Response>, Error = ()> + 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<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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more