pub struct ProxyConnector<C> { /* private fields */ }
Expand description
A wrapper around Proxy
s with a connector.
Implementations§
Source§impl<C> ProxyConnector<C>
impl<C> ProxyConnector<C>
Sourcepub fn from_proxy(connector: C, proxy: Proxy) -> Result<Self, Error>
pub fn from_proxy(connector: C, proxy: Proxy) -> Result<Self, Error>
Create a proxy connector and attach a particular proxy
Sourcepub fn from_proxy_unsecured(connector: C, proxy: Proxy) -> Self
pub fn from_proxy_unsecured(connector: C, proxy: Proxy) -> Self
Create a proxy connector and attach a particular proxy
Sourcepub fn with_connector<CC>(self, connector: CC) -> ProxyConnector<CC>
pub fn with_connector<CC>(self, connector: CC) -> ProxyConnector<CC>
Change proxy connector
Sourcepub fn set_tls(&mut self, tls: Option<NativeTlsConnector>)
pub fn set_tls(&mut self, tls: Option<NativeTlsConnector>)
Set or unset tls when tunneling
Sourcepub fn extend_proxies<I: IntoIterator<Item = Proxy>>(&mut self, proxies: I)
pub fn extend_proxies<I: IntoIterator<Item = Proxy>>(&mut self, proxies: I)
Extend the list of proxies
Sourcepub fn http_headers(&self, uri: &Uri) -> Option<&HeaderMap>
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§
Source§impl<C: Clone> Clone for ProxyConnector<C>
impl<C: Clone> Clone for ProxyConnector<C>
Source§fn clone(&self) -> ProxyConnector<C>
fn clone(&self) -> ProxyConnector<C>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C: Debug> Debug for ProxyConnector<C>
impl<C: Debug> Debug for ProxyConnector<C>
Source§impl<C> Service<Uri> for ProxyConnector<C>
impl<C> Service<Uri> for ProxyConnector<C>
Source§type Future = Pin<Box<dyn Future<Output = Result<<ProxyConnector<C> as Service<Uri>>::Response, <ProxyConnector<C> as Service<Uri>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<ProxyConnector<C> as Service<Uri>>::Response, <ProxyConnector<C> as Service<Uri>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<C> Freeze for ProxyConnector<C>where
C: Freeze,
impl<C> !RefUnwindSafe for ProxyConnector<C>
impl<C> Send for ProxyConnector<C>where
C: Send,
impl<C> Sync for ProxyConnector<C>where
C: Sync,
impl<C> Unpin for ProxyConnector<C>where
C: Unpin,
impl<C> !UnwindSafe for ProxyConnector<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)