[][src]Struct async_json_rpc::clients::http::Client

pub struct Client<C> { /* fields omitted */ }

A handle to a remote HTTP JSONRPC server.

Implementations

impl Client<HttpConnector>[src]

pub fn new(url: String, user: Option<String>, password: Option<String>) -> Self[src]

Creates a new client.

impl<C> Client<C>[src]

pub fn next_nonce(&self) -> usize[src]

impl Client<HttpsConnector<HttpConnector>>[src]

pub fn new_tls(
    url: String,
    user: Option<String>,
    password: Option<String>
) -> Self
[src]

Creates a new TLS client.

impl<C> Client<C> where
    C: Connect + Clone + Send + Sync + 'static, 
[src]

pub async fn send<'_>(
    &'_ self,
    request: Request
) -> Result<Response, Error<HyperError>>
[src]

Trait Implementations

impl<C: Clone> Clone for Client<C>[src]

impl<C: Debug> Debug for Client<C>[src]

impl<C> RequestFactory for Client<C>[src]

impl<C> Service<Request> for Client<C> where
    C: Connect + Clone + Send + Sync + 'static, 
[src]

type Response = Response

Responses given by the service.

type Error = Error<HyperError>

Errors produced by the service.

type Future = Pin<Box<dyn Future<Output = Result<Response, Self::Error>> + Send + 'static>>

The future response value.

Auto Trait Implementations

impl<C> !RefUnwindSafe for Client<C>

impl<C> Send for Client<C> where
    C: Send

impl<C> Sync for Client<C> where
    C: Sync

impl<C> Unpin for Client<C> where
    C: Unpin

impl<C> !UnwindSafe for Client<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.