Struct hyper::client::HttpConnector
[−]
[src]
pub struct HttpConnector { /* fields omitted */ }
A connector for the http
scheme.
Methods
impl HttpConnector
[src]
pub fn new(threads: usize, handle: &Handle) -> HttpConnector
[src]
Construct a new HttpConnector.
Takes number of DNS worker threads.
pub fn new_with_executor<E: 'static>(
executor: E,
handle: &Handle
) -> HttpConnector where
E: Executor<HttpConnectorBlockingTask>,
[src]
executor: E,
handle: &Handle
) -> HttpConnector where
E: Executor<HttpConnectorBlockingTask>,
Construct a new HttpConnector.
Takes an executor to run blocking tasks on.
pub fn enforce_http(&mut self, is_enforced: bool)
[src]
Option to enforce all Uri
s have the http
scheme.
Enabled by default.
pub fn set_keepalive(&mut self, dur: Option<Duration>)
[src]
Set that all sockets have SO_KEEPALIVE
set with the supplied duration.
If None
, the option will not be set.
Default is None
.
Trait Implementations
impl Clone for HttpConnector
[src]
fn clone(&self) -> HttpConnector
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for HttpConnector
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Service for HttpConnector
[src]
type Request = Uri
Requests handled by the service.
type Response = TcpStream
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = HttpConnecting
The future response value.
fn call(&self, uri: Uri) -> Self::Future
[src]
Process the request and return the response asynchronously.