Struct hyper_proxy::Proxy
[−]
[src]
pub struct Proxy<C> { /* fields omitted */ }
The proxy
Methods
impl<C> Proxy<C>
[src]
fn new(connector: C, intercept: Intercept, uri: Uri) -> Result<Self, Error>
[src]
Create a new secured Proxy
fn unsecured(connector: C, intercept: Intercept, uri: Uri) -> Self
[src]
Create a new unsecured Proxy
fn with_connector<CC>(self, connector: CC) -> Proxy<CC>
[src]
Change proxy connector
[src]
Set proxy authorization
fn set_header<H: Header>(&mut self, header: H)
[src]
Set a custom header
fn set_tls(&mut self, tls: Option<TlsConnector>)
[src]
Set a custom header
fn intercept(&self) -> &Intercept
[src]
Get current intercept
fn uri(&self) -> &Uri
[src]
Get current intercept
Trait Implementations
impl<C: Debug> Debug for Proxy<C>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl<C> Service for Proxy<C> where
C: Service<Request = Uri, Error = Error> + 'static,
C::Future: 'static,
<C::Future as Future>::Item: AsyncRead + AsyncWrite + 'static,
[src]
C: Service<Request = Uri, Error = Error> + 'static,
C::Future: 'static,
<C::Future as Future>::Item: AsyncRead + AsyncWrite + 'static,
type Request = Uri
Requests handled by the service.
type Response = ProxyStream<C::Response>
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = Box<Future<Item = ProxyStream<C::Response>, Error = Self::Error>>
The future response value.
fn call(&self, uri: Uri) -> Self::Future
[src]
Process the request and return the response asynchronously.