Struct jsonrpsee_http_client::HttpClient
source · [−]pub struct HttpClient { /* private fields */ }
Expand description
JSON-RPC HTTP Client that provides functionality to perform method calls and notifications.
Trait Implementations
sourceimpl ClientT for HttpClient
impl ClientT for HttpClient
sourcefn request<'a, 'life0, 'async_trait, R>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>> where
R: DeserializeOwned,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn request<'a, 'life0, 'async_trait, R>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>> where
R: DeserializeOwned,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Perform a request towards the server.
sourcefn notification<'a, 'life0, 'async_trait>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn notification<'a, 'life0, 'async_trait>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Send a notification request
sourcefn batch_request<'a, 'life0, 'async_trait, R>(
&'life0 self,
batch: Vec<(&'a str, Option<ParamsSer<'a>>)>
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>> where
R: DeserializeOwned + Default + Clone,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn batch_request<'a, 'life0, 'async_trait, R>(
&'life0 self,
batch: Vec<(&'a str, Option<ParamsSer<'a>>)>
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>> where
R: DeserializeOwned + Default + Clone,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Send a batch request. Read more
sourceimpl Clone for HttpClient
impl Clone for HttpClient
sourcefn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HttpClient
impl Debug for HttpClient
sourceimpl SubscriptionClientT for HttpClient
impl SubscriptionClientT for HttpClient
sourcefn subscribe<'a, 'life0, 'async_trait, N>(
&'life0 self,
_subscribe_method: &'a str,
_params: Option<ParamsSer<'a>>,
_unsubscribe_method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>> where
N: DeserializeOwned,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn subscribe<'a, 'life0, 'async_trait, N>(
&'life0 self,
_subscribe_method: &'a str,
_params: Option<ParamsSer<'a>>,
_unsubscribe_method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>> where
N: DeserializeOwned,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Send a subscription request to the server. Not implemented for HTTP; will always return Error::HttpNotImplemented
.
sourcefn subscribe_to_method<'a, 'life0, 'async_trait, N>(
&'life0 self,
_method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>> where
N: DeserializeOwned,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn subscribe_to_method<'a, 'life0, 'async_trait, N>(
&'life0 self,
_method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>> where
N: DeserializeOwned,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Subscribe to a specific method. Not implemented for HTTP; will always return Error::HttpNotImplemented
.
Auto Trait Implementations
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn 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>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more