pub struct ProxyConfig {
pub host: String,
pub port: u16,
pub auth: Option<(String, String)>,
}Expand description
Where to route HTTP(S) traffic through. Parsed from a curl-style proxy
URL — typically http://user:pass@host:port. Only http:// proxies are
supported in this milestone; TLS-to-proxy (https://) and SOCKS are
rejected with Error::UnsupportedScheme.
Fields§
§host: String§port: u16§auth: Option<(String, String)>Credentials to send in Proxy-Authorization: Basic. Either parsed
from user:pass@proxy in the proxy URL or supplied separately via
Request::proxy_user.
Implementations§
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnsafeUnpin for ProxyConfig
impl UnwindSafe for ProxyConfig
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