pub struct RpcService(/* private fields */);
Available on crate features
async-client
and async-wasm-client
and client
only.Expand description
RpcService implementation for the async client.
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 = Result<MiddlewareMethodResponse, Error>
type MethodResponse = Result<MiddlewareMethodResponse, Error>
Response type for
RpcServiceT::call
.Source§type BatchResponse = Result<Vec<RawResponse<'static>>, Error>
type BatchResponse = Result<Vec<RawResponse<'static>>, Error>
Response type for
RpcServiceT::batch
.Source§type NotificationResponse = Result<MiddlewareNotifResponse, Error>
type NotificationResponse = Result<MiddlewareNotifResponse, Error>
Response type for
RpcServiceT::notification
.Source§fn call<'a>(
&self,
request: Request<'a>,
) -> impl Future<Output = Self::MethodResponse> + Send + 'a
fn call<'a>( &self, request: 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::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