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 copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
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 BatchResponse = MethodResponse
type BatchResponse = MethodResponse
Response type for
RpcServiceT::batch
.Source§type MethodResponse = MethodResponse
type MethodResponse = MethodResponse
Response type for
RpcServiceT::call
.Source§type NotificationResponse = MethodResponse
type NotificationResponse = MethodResponse
Response type for
RpcServiceT::notification
.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,
batch: Batch<'a>,
) -> impl Future<Output = Self::BatchResponse> + Send + 'a
fn batch<'a>( &self, batch: 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::BatchResponse> + Send + 'a
fn notification<'a>( &self, n: Notification<'a>, ) -> impl Future<Output = Self::BatchResponse> + 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