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]
impl HttpConnector
pub fn new(threads: usize) -> HttpConnector
[src]
pub fn new(threads: usize) -> HttpConnector
Construct a new HttpConnector.
Takes number of DNS worker threads.
pub fn new_with_handle(threads: usize, handle: Handle) -> HttpConnector
[src]
pub fn new_with_handle(threads: usize, handle: Handle) -> HttpConnector
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]
pub fn new_with_executor<E: 'static>(
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]
pub fn enforce_http(&mut self, is_enforced: bool)
Option to enforce all Uri
s have the http
scheme.
Enabled by default.
pub fn set_keepalive(&mut self, dur: Option<Duration>)
[src]
pub fn set_keepalive(&mut self, dur: Option<Duration>)
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]
pub fn set_nodelay(&mut self, nodelay: bool)
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]
pub fn set_local_address(&mut self, addr: Option<IpAddr>)
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]
impl Clone for HttpConnector
fn clone(&self) -> HttpConnector
[src]
fn clone(&self) -> HttpConnector
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 Debug for HttpConnector
[src]
impl Debug for HttpConnector
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 Connect for HttpConnector
[src]
impl Connect for HttpConnector
Auto Trait Implementations
impl Send for HttpConnector
impl Send for HttpConnector
impl Sync for HttpConnector
impl Sync for HttpConnector