pub struct RpcService { /* private fields */ }
Expand description
JSON-RPC service middleware.
Trait Implementations§
Source§impl Clone for RpcService
impl Clone for RpcService
Source§fn clone(&self) -> RpcService
fn clone(&self) -> RpcService
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RpcService
impl Debug for RpcService
Source§impl RpcServiceT for RpcService
impl RpcServiceT for RpcService
Source§type MethodResponse = MethodResponse
type MethodResponse = MethodResponse
Response type for
RpcServiceT::call
.Source§type NotificationResponse = Option<MethodResponse>
type NotificationResponse = Option<MethodResponse>
Response type for
RpcServiceT::notification
.Source§type BatchResponse = BatchResponse
type BatchResponse = BatchResponse
Response type for
RpcServiceT::batch
.Source§fn call<'a>(
&self,
req: Request<'a>,
) -> impl Future<Output = Self::MethodResponse> + Send + 'a
fn call<'a>( &self, req: Request<'a>, ) -> impl Future<Output = Self::MethodResponse> + Send + 'a
Processes a single JSON-RPC call, which may be a subscription or regular call.
Source§fn batch<'a>(
&self,
req: Batch<'a>,
) -> impl Future<Output = Self::BatchResponse> + Send + 'a
fn batch<'a>( &self, req: Batch<'a>, ) -> impl Future<Output = Self::BatchResponse> + Send + 'a
Processes multiple JSON-RPC calls at once, similar to
RpcServiceT::call
. Read moreSource§fn notification<'a>(
&self,
_n: Notification<'a>,
) -> impl Future<Output = Self::NotificationResponse> + Send + 'a
fn notification<'a>( &self, _n: Notification<'a>, ) -> impl Future<Output = Self::NotificationResponse> + Send + 'a
Similar to
RpcServiceT::call
but processes a JSON-RPC notification.Auto Trait Implementations§
impl Freeze for RpcService
impl !RefUnwindSafe for RpcService
impl Send for RpcService
impl Sync for RpcService
impl Unpin for RpcService
impl !UnwindSafe for RpcService
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> 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>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSend for Twhere
T: Send,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 80 bytes