Struct hyper_timeout_connector::HttpTimeoutConnector
[−]
[src]
pub struct HttpTimeoutConnector { /* fields omitted */ }
A Hyper NetworkConnector
which offers a connction timeout.
Methods
impl HttpTimeoutConnector
[src]
fn new() -> HttpTimeoutConnector
Creates a new HttpTimeoutConnector
.
The connector initially has no connection timeout.
fn connect_timeout(&self) -> Option<Duration>
Returns the connection timeout.
fn set_connect_timeout(&mut self, timeout: Option<Duration>)
Sets the connection timeout.
Trait Implementations
impl NetworkConnector for HttpTimeoutConnector
[src]
type Stream = HttpStream
Type of Stream
to create
fn connect(&self, host: &str, port: u16, scheme: &str) -> Result<HttpStream>
Connect to a remote address.