pub struct ProxyRules { /* private fields */ }Expand description
Built-in proxy selector that applies explicit proxy rules first and can optionally fall back to standard environment variables.
Implementations§
Source§impl ProxyRules
impl ProxyRules
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty selector that always connects directly unless proxy rules or system proxy lookup are added.
Sourcepub fn proxy(self, proxy: Proxy) -> Self
pub fn proxy(self, proxy: Proxy) -> Self
Adds a proxy rule to this selector. The first matching rule wins.
Sourcepub fn use_system_proxy(self, enabled: bool) -> Self
pub fn use_system_proxy(self, enabled: bool) -> Self
Opts into reading proxy rules from standard environment variables when no explicit rule matches.
Trait Implementations§
Source§impl Clone for ProxyRules
impl Clone for ProxyRules
Source§fn clone(&self) -> ProxyRules
fn clone(&self) -> ProxyRules
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 moreSource§impl Debug for ProxyRules
impl Debug for ProxyRules
Source§impl Default for ProxyRules
impl Default for ProxyRules
Source§fn default() -> ProxyRules
fn default() -> ProxyRules
Returns the “default value” for a type. Read more
Source§impl ProxySelector for ProxyRules
impl ProxySelector for ProxyRules
Auto Trait Implementations§
impl Freeze for ProxyRules
impl RefUnwindSafe for ProxyRules
impl Send for ProxyRules
impl Sync for ProxyRules
impl Unpin for ProxyRules
impl UnsafeUnpin for ProxyRules
impl UnwindSafe for ProxyRules
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