Struct Matcher
struct Matcher { ... }
A proxy matcher, usually built from environment variables.
Implementations
impl Matcher
fn from_env() -> SelfCreate 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_proxyHTTPS_PROXY/https_proxyHTTP_PROXY/http_proxyNO_PROXY/no_proxy
fn from_system() -> SelfCreate 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-systemfeature is enabled, it will check more configuration. Use this constructor if you want to allow users to optionally enable more, or usefrom_envif you do not want the values to change based on an enabled feature.fn builder() -> BuilderStart a builder to configure a matcher.
fn intercept(self: &Self, dst: &Uri) -> Option<Intercept>Check if the destination should be intercepted by a proxy.
If the proxy rules match the destination, a new
Uriwill be returned to connect to.
impl Debug for Matcher
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for Matcher
impl RefUnwindSafe for Matcher
impl Send for Matcher
impl Sync for Matcher
impl Unpin for Matcher
impl UnsafeUnpin for Matcher
impl UnwindSafe for Matcher
impl<T> Any for Matcher
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Matcher
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Matcher
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Matcher
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Matcher
impl<T> WithSubscriber for Matcher
impl<T, U> Into for Matcher
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Matcher
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Matcher
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>