[−][src]Struct hyper_proxy::ProxyConnector
A wrapper around Proxy
s with a connector.
Methods
impl<C> ProxyConnector<C>
[src]
pub fn new(connector: C) -> Result<Self, Error>
[src]
Create a new secured Proxies
pub fn unsecured(connector: C) -> Self
[src]
Create a new unsecured Proxy
pub fn from_proxy(connector: C, proxy: Proxy) -> Result<Self, Error>
[src]
Create a proxy connector and attach a particular proxy
pub fn from_proxy_unsecured(connector: C, proxy: Proxy) -> Self
[src]
Create a proxy connector and attach a particular proxy
pub fn with_connector<CC>(self, connector: CC) -> ProxyConnector<CC>
[src]
Change proxy connector
pub fn set_tls(&mut self, tls: Option<NativeTlsConnector>)
[src]
Set or unset tls when tunneling
pub fn proxies(&self) -> &[Proxy]
[src]
Get the current proxies
pub fn add_proxy(&mut self, proxy: Proxy)
[src]
Add a new additional proxy
pub fn extend_proxies<I: IntoIterator<Item = Proxy>>(&mut self, proxies: I)
[src]
Extend the list of proxies
pub fn http_headers(&self, uri: &Uri) -> Option<&HeaderMap>
[src]
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]
fn clone(&self) -> ProxyConnector<C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<C: Debug> Debug for ProxyConnector<C>
[src]
impl<C> Connect for ProxyConnector<C> where
C: Connect + 'static,
[src]
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<dyn 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]
Auto Trait Implementations
impl<C> Send for ProxyConnector<C> where
C: Send,
C: Send,
impl<C> Unpin for ProxyConnector<C> where
C: Unpin,
C: Unpin,
impl<C> Sync for ProxyConnector<C> where
C: Sync,
C: Sync,
impl<C> !RefUnwindSafe for ProxyConnector<C>
impl<C> !UnwindSafe for ProxyConnector<C>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,