pub struct ProxyEnvironment {
pub http_proxy: Option<String>,
pub https_proxy: Option<String>,
pub no_proxy: String,
}Fields§
§http_proxy: Option<String>§https_proxy: Option<String>§no_proxy: StringImplementations§
Source§impl ProxyEnvironment
impl ProxyEnvironment
Sourcepub fn proxy_for(&self, url: &Url) -> Result<Option<Url>>
pub fn proxy_for(&self, url: &Url) -> Result<Option<Url>>
Values are supplied by the host from HTTP_PROXY/HTTPS_PROXY/NO_PROXY (or lowercase overrides).
Only http:// proxies are accepted; see Self::proxy_for_tls_capable.
Sourcepub fn proxy_for_tls_capable(&self, url: &Url) -> Result<Option<Url>>
pub fn proxy_for_tls_capable(&self, url: &Url) -> Result<Option<Url>>
Self::proxy_for, also accepting https:// proxies. The caller must
then secure the hop to the proxy itself: after connecting, perform the
Route::proxy_tls upgrade before anything else is written.
Trait Implementations§
Source§impl Clone for ProxyEnvironment
impl Clone for ProxyEnvironment
Source§impl Debug for ProxyEnvironment
impl Debug for ProxyEnvironment
Auto Trait Implementations§
impl Forget for ProxyEnvironment
impl Freeze for ProxyEnvironment
impl RefUnwindSafe for ProxyEnvironment
impl Send for ProxyEnvironment
impl Sync for ProxyEnvironment
impl Unpin for ProxyEnvironment
impl UnsafeUnpin for ProxyEnvironment
impl UnwindSafe for ProxyEnvironment
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