[−][src]Struct async_jsonrpc_client::HttpTransport
HTTP transport
Implementations
impl HttpTransport
[src]
pub fn new<U: Into<String>>(url: U) -> Self
[src]
Create a new HTTP transport with given url
.
pub fn new_with_bearer_auth<U: Into<String>, T: Into<String>>(
url: U,
token: T
) -> Self
[src]
url: U,
token: T
) -> Self
Create a new HTTP transport with given url
and bearer token
.
Trait Implementations
impl BatchTransport for HttpTransport
[src]
#[must_use]fn execute_batch<'life0, 'async_trait, I>(
&'life0 self,
requests: I
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
I: IntoIterator<Item = (RequestId, Call)> + Send,
I::IntoIter: Send,
I: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
requests: I
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
I: IntoIterator<Item = (RequestId, Call)> + Send,
I::IntoIter: Send,
I: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
#[must_use]fn send_batch<'life0, 'async_trait, I, M>(
&'life0 self,
method_and_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Value>>>> + Send + 'async_trait>> where
I: IntoIterator<Item = (M, Params)> + Send,
I::IntoIter: Send,
M: Into<String>,
I: 'async_trait,
M: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
method_and_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Value>>>> + Send + 'async_trait>> where
I: IntoIterator<Item = (M, Params)> + Send,
I::IntoIter: Send,
M: Into<String>,
I: 'async_trait,
M: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
#[must_use]fn send_batch_same<'life0, 'async_trait, I, M, T>(
&'life0 self,
method: M,
batch_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>> where
I: IntoIterator<Item = Params> + Send,
I::IntoIter: Send,
M: Into<String> + Send,
T: DeserializeOwned,
I: 'async_trait,
M: 'async_trait,
T: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
method: M,
batch_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>> where
I: IntoIterator<Item = Params> + Send,
I::IntoIter: Send,
M: Into<String> + Send,
T: DeserializeOwned,
I: 'async_trait,
M: 'async_trait,
T: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
impl Clone for HttpTransport
[src]
fn clone(&self) -> HttpTransport
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Transport for HttpTransport
[src]
fn prepare<M: Into<String>>(
&self,
method: M,
params: Params
) -> (RequestId, Call)
[src]
&self,
method: M,
params: Params
) -> (RequestId, Call)
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: RequestId,
request: &'life1 Request
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
_id: RequestId,
request: &'life1 Request
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn send<'life0, 'async_trait, M, T>(
&'life0 self,
method: M,
params: Params
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>> where
M: Into<String> + Send,
T: DeserializeOwned,
M: 'async_trait,
T: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
method: M,
params: Params
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>> where
M: Into<String> + Send,
T: DeserializeOwned,
M: 'async_trait,
T: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Unpin for HttpTransport
impl !UnwindSafe for HttpTransport
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,