Trait hyper::net::NetworkConnector [−][src]
pub trait NetworkConnector { type Stream: Into<Box<NetworkStream + Send>>; fn connect(
&self,
host: &str,
port: u16,
scheme: &str
) -> Result<Self::Stream>; }
A connector creates a NetworkStream.
Associated Types
type Stream: Into<Box<NetworkStream + Send>>
Type of Stream to create
Required Methods
fn connect(&self, host: &str, port: u16, scheme: &str) -> Result<Self::Stream>
Connect to a remote address.
Implementors
impl<C: NetworkConnector<Stream = S>, S: NetworkStream + Send> NetworkConnector for Pool<C> type Stream = PooledStream<S>;
impl NetworkConnector for HttpConnector type Stream = HttpStream;
impl<F> NetworkConnector for F where
F: Fn(&str, u16, &str) -> Result<TcpStream>, type Stream = HttpStream;impl<S: Ssl> NetworkConnector for HttpsConnector<S> type Stream = HttpsStream<S::Stream>;