struct ContextAwareHandler<Handler: PubSubRpcHandler> {
handler: Handler,
context: PubSubContext<Handler>,
}Expand description
A compatibility helper type to use common RpcHandler functions
Fields§
§handler: Handler§context: PubSubContext<Handler>Trait Implementations§
Source§impl<Handler: PubSubRpcHandler> Clone for ContextAwareHandler<Handler>
impl<Handler: PubSubRpcHandler> Clone for ContextAwareHandler<Handler>
Source§impl<Handler: PubSubRpcHandler> RpcHandler for ContextAwareHandler<Handler>
impl<Handler: PubSubRpcHandler> RpcHandler for ContextAwareHandler<Handler>
Source§type Request = <Handler as PubSubRpcHandler>::Request
type Request = <Handler as PubSubRpcHandler>::Request
The request type to expect
Source§fn on_request<'life0, 'async_trait>(
&'life0 self,
request: Self::Request,
) -> Pin<Box<dyn Future<Output = ResponseResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_request<'life0, 'async_trait>(
&'life0 self,
request: Self::Request,
) -> Pin<Box<dyn Future<Output = ResponseResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoked when the request was received
Source§fn on_call<'life0, 'async_trait>(
&'life0 self,
call: RpcMethodCall,
) -> Pin<Box<dyn Future<Output = RpcResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_call<'life0, 'async_trait>(
&'life0 self,
call: RpcMethodCall,
) -> Pin<Box<dyn Future<Output = RpcResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoked for every incoming
RpcMethodCall Read moreAuto Trait Implementations§
impl<Handler> Freeze for ContextAwareHandler<Handler>where
Handler: Freeze,
impl<Handler> !RefUnwindSafe for ContextAwareHandler<Handler>
impl<Handler> Send for ContextAwareHandler<Handler>
impl<Handler> Sync for ContextAwareHandler<Handler>
impl<Handler> Unpin for ContextAwareHandler<Handler>
impl<Handler> !UnwindSafe for ContextAwareHandler<Handler>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.