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>;
    fn set_ssl_verifier(&mut self, verifier: ContextVerifier);
}

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.

fn set_ssl_verifier(&mut self, verifier: ContextVerifier)

Sets the given ContextVerifier to be used when verifying the SSL context on the establishment of a new connection.

Implementors