Struct hyper::client::HttpConnector
[−]
[src]
pub struct HttpConnector { /* fields omitted */ }A connector for the http scheme.
Performs DNS resolution in a thread pool, and then connects over TCP.
Methods
impl HttpConnector[src]
pub fn new(threads: usize) -> HttpConnector[src]
Construct a new HttpConnector.
Takes number of DNS worker threads.
pub fn new_with_handle(threads: usize, handle: Handle) -> HttpConnector[src]
Construct a new HttpConnector with a specific Tokio handle.
pub fn new_with_executor<E: 'static>(
executor: E,
handle: Option<Handle>
) -> HttpConnector where
E: Executor<HttpConnectorBlockingTask> + Send + Sync, [src]
executor: E,
handle: Option<Handle>
) -> HttpConnector where
E: Executor<HttpConnectorBlockingTask> + Send + Sync,
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 Uris 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.
pub fn set_nodelay(&mut self, nodelay: bool)[src]
Set that all sockets have SO_NODELAY set to the supplied value nodelay.
Default is false.
pub fn set_local_address(&mut self, addr: Option<IpAddr>)[src]
Set that all sockets are bound to the configured address before connection.
If None, the sockets will not be bound.
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