[−][src]Struct hyper_proxy::ProxyConnector
A wrapper around Proxy
s with a connector.
Implementations
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]
impl<C: Debug> Debug for ProxyConnector<C>
[src]
impl<C> Service<Uri> for ProxyConnector<C> where
C: Service<Uri>,
C::Response: AsyncRead + AsyncWrite + Send + Unpin + 'static,
C::Future: Send + 'static,
C::Error: Into<Box<dyn Error + Send + Sync>>,
[src]
C: Service<Uri>,
C::Response: AsyncRead + AsyncWrite + Send + Unpin + 'static,
C::Future: Send + 'static,
C::Error: Into<Box<dyn Error + Send + Sync>>,
type Response = ProxyStream<C::Response>
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>
The future response value.
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
[src]
fn call(&mut self, uri: Uri) -> Self::Future
[src]
Auto Trait Implementations
impl<C> !RefUnwindSafe for ProxyConnector<C>
impl<C> Send for ProxyConnector<C> where
C: Send,
C: Send,
impl<C> Sync for ProxyConnector<C> where
C: Sync,
C: Sync,
impl<C> Unpin for ProxyConnector<C> where
C: Unpin,
C: Unpin,
impl<C> !UnwindSafe for ProxyConnector<C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S, T> Connect for S where
S: Service<Uri, Response = T> + Send + 'static,
T: AsyncRead + AsyncWrite + Connection + Unpin + Send + 'static,
<S as Service<Uri>>::Error: Into<Box<dyn Error + 'static + Send + Sync>>,
<S as Service<Uri>>::Future: Unpin,
<S as Service<Uri>>::Future: Send,
[src]
S: Service<Uri, Response = T> + Send + 'static,
T: AsyncRead + AsyncWrite + Connection + Unpin + Send + 'static,
<S as Service<Uri>>::Error: Into<Box<dyn Error + 'static + Send + Sync>>,
<S as Service<Uri>>::Future: Unpin,
<S as Service<Uri>>::Future: Send,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,