Struct jsonrpc_client_http::HttpTransport [−][src]
pub struct HttpTransport { /* fields omitted */ }
The main struct of the HTTP transport implementation for
jsonrpc_client_core
.
Acts as a handle to a stream running on the Tokio Core
event loop thread. The handle allows
sending Hyper Request
s to the event loop and the stream running there will then send it
to the destination and wait for the response.
This is just a handle without any destination (URI), and it does not implement
Transport
.
To get a handle implementing Transport
to use with an RPC client you call the
handle
method with a URI.
Methods
impl HttpTransport
[src]
impl HttpTransport
pub fn new() -> HttpTransportBuilder<DefaultClient>
[src]
pub fn new() -> HttpTransportBuilder<DefaultClient>
Returns a builder to create a HttpTransport
.
The final transport that is created will not support https. Either compile the crate with
the "tls" feature to get that functionality through the with_tls
constructor, or provide
a custom Hyper client that supports TLS via the HttpTransportBuilder::with_client
method.
pub fn handle(&self, uri: &str) -> Result<HttpHandle>
[src]
pub fn handle(&self, uri: &str) -> Result<HttpHandle>
Returns a handle to this HttpTransport
valid for a given URI.
Used to create instances implementing jsonrpc_client_core::Transport
for use with RPC
clients.
Trait Implementations
impl Debug for HttpTransport
[src]
impl Debug for HttpTransport
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 HttpTransport
[src]
impl Clone for HttpTransport
fn clone(&self) -> HttpTransport
[src]
fn clone(&self) -> HttpTransport
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
Auto Trait Implementations
impl Send for HttpTransport
impl Send for HttpTransport
impl Sync for HttpTransport
impl Sync for HttpTransport