pub struct Matcher { /* private fields */ }
Expand description
A proxy matcher, usually built from environment variables.
Implementations§
Source§impl Matcher
impl Matcher
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create a matcher reading the current environment variables.
This checks for values in the following variables, treating them the same as curl does:
ALL_PROXY
/all_proxy
HTTPS_PROXY
/https_proxy
HTTP_PROXY
/http_proxy
NO_PROXY
/no_proxy
Sourcepub fn from_system() -> Self
pub fn from_system() -> Self
Create a matcher from the environment or system.
This checks the same environment variables as from_env()
, and if not
set, checks the system configuration for values for the OS.
This constructor is always available, but if the client-proxy-system
feature is enabled, it will check more configuration. Use this
constructor if you want to allow users to optionally enable more, or
use from_env
if you do not want the values to change based on an
enabled feature.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Matcher
impl RefUnwindSafe for Matcher
impl Send for Matcher
impl Sync for Matcher
impl Unpin for Matcher
impl UnwindSafe for Matcher
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