Struct jsonrpc_client_http::HttpHandle [−][src]
pub struct HttpHandle { /* fields omitted */ }
A handle to a HttpTransport
. This implements
jsonrpc_client_core::Transport
and can be used as the transport for a RPC client generated
by the jsonrpc_client!
macro.
Methods
impl HttpHandle
[src]
impl HttpHandle
ⓘImportant traits for &'a mut Rpub fn set_header<H: Header>(&mut self, header: H) -> &mut Self
[src]
pub fn set_header<H: Header>(&mut self, header: H) -> &mut Self
Configure a custom HTTP header for all requests sent through this transport.
Replaces any header set by this library or by Hyper, such as the ContentType, ContentLength and Host headers.
Trait Implementations
impl Debug for HttpHandle
[src]
impl Debug for HttpHandle
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for HttpHandle
[src]
impl Clone for HttpHandle
fn clone(&self) -> HttpHandle
[src]
fn clone(&self) -> HttpHandle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Transport for HttpHandle
[src]
impl Transport for HttpHandle
type Future = Box<Future<Item = Vec<u8>, Error = Self::Error> + Send>
The future type this transport returns on send operations.
type Error = Error
The type of error that this transport emits if it fails.
fn get_next_id(&mut self) -> u64
[src]
fn get_next_id(&mut self) -> u64
Returns an id that has not yet been used on this transport. Used by the RPC clients to fill in the "id" field of a request. Read more
fn send(&self, json_data: Vec<u8>) -> Self::Future
[src]
fn send(&self, json_data: Vec<u8>) -> Self::Future
Sends the given data over the transport and returns a future that will complete with the response to the request, or the transport specific error if something went wrong. Read more
Auto Trait Implementations
impl Send for HttpHandle
impl Send for HttpHandle
impl !Sync for HttpHandle
impl !Sync for HttpHandle