Struct hyper_proxy::ProxyConnector [−][src]
pub struct ProxyConnector<C> { /* fields omitted */ }A wrapper around Proxys with a connector.
Methods
impl<C> ProxyConnector<C>[src]
impl<C> ProxyConnector<C>pub fn new(connector: C) -> Result<Self, Error>[src]
pub fn new(connector: C) -> Result<Self, Error>Create a new secured Proxies
pub fn unsecured(connector: C) -> Self[src]
pub fn unsecured(connector: C) -> SelfCreate a new unsecured Proxy
pub fn from_proxy(connector: C, proxy: Proxy) -> Result<Self, Error>[src]
pub fn from_proxy(connector: C, proxy: Proxy) -> Result<Self, Error>Create a proxy connector and attach a particular proxy
pub fn from_proxy_unsecured(connector: C, proxy: Proxy) -> Self[src]
pub fn from_proxy_unsecured(connector: C, proxy: Proxy) -> SelfCreate a proxy connector and attach a particular proxy
pub fn with_connector<CC>(self, connector: CC) -> ProxyConnector<CC>[src]
pub fn with_connector<CC>(self, connector: CC) -> ProxyConnector<CC>Change proxy connector
pub fn set_tls(&mut self, tls: Option<NativeTlsConnector>)[src]
pub fn set_tls(&mut self, tls: Option<NativeTlsConnector>)Set or unset tls when tunneling
pub fn proxies(&self) -> &[Proxy][src]
pub fn proxies(&self) -> &[Proxy]Get the current proxies
pub fn add_proxy(&mut self, proxy: Proxy)[src]
pub fn add_proxy(&mut self, proxy: Proxy)Add a new additional proxy
pub fn extend_proxies<I: IntoIterator<Item = Proxy>>(&mut self, proxies: I)[src]
pub fn extend_proxies<I: IntoIterator<Item = Proxy>>(&mut self, proxies: I)Extend the list of proxies
pub fn http_headers(&self, uri: &Uri) -> Option<&HeaderMap>[src]
pub fn http_headers(&self, uri: &Uri) -> Option<&HeaderMap>Get http headers for a matching uri
These headers must be appended to the hyper Request for the proxy to work properly. This is needed only for http requests.
Trait Implementations
impl<C: Clone> Clone for ProxyConnector<C>[src]
impl<C: Clone> Clone for ProxyConnector<C>fn clone(&self) -> ProxyConnector<C>[src]
fn clone(&self) -> ProxyConnector<C>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<C: Debug> Debug for ProxyConnector<C>[src]
impl<C: Debug> Debug for ProxyConnector<C>fn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl<C> Connect for ProxyConnector<C> where
C: Connect + 'static, [src]
impl<C> Connect for ProxyConnector<C> where
C: Connect + 'static, type Transport = ProxyStream<C::Transport>
The connected IO Stream.
type Error = Error
An error occured when trying to connect.
type Future = Box<Future<Item = (Self::Transport, Connected), Error = Self::Error> + Send>
A Future that will resolve to the connected Transport.
fn connect(&self, dst: Destination) -> Self::Future[src]
fn connect(&self, dst: Destination) -> Self::FutureConnect to a destination.
Auto Trait Implementations
impl<C> Send for ProxyConnector<C> where
C: Send,
impl<C> Send for ProxyConnector<C> where
C: Send, impl<C> Sync for ProxyConnector<C> where
C: Sync,
impl<C> Sync for ProxyConnector<C> where
C: Sync,