Struct Builder
struct Builder { ... }
A builder to create a Matcher.
Construct with [Matcher::builder()].
Implementations
impl Builder
fn all<S>(self: Self, val: S) -> Self where S: IntoValueSet the target proxy for all destinations.
fn http<S>(self: Self, val: S) -> Self where S: IntoValueSet the target proxy for HTTP destinations.
fn https<S>(self: Self, val: S) -> Self where S: IntoValueSet the target proxy for HTTPS destinations.
fn no<S>(self: Self, val: S) -> Self where S: IntoValueSet the "no" proxy filter.
The rules are as follows:
- Entries are expected to be comma-separated (whitespace between entries is ignored)
- IP addresses (both IPv4 and IPv6) are allowed, as are optional subnet masks (by adding /size,
for example "
192.168.1.0/24"). - An entry "
*" matches all hostnames (this is the only wildcard allowed) - Any other entry is considered a domain name (and may contain a leading dot, for example
google.comand.google.comare equivalent) and would match both that domain AND all subdomains.
For example, if
"NO_PROXY=google.com, 192.168.1.0/24"was set, all of the following would match (and therefore would bypass the proxy):http://google.com/http://www.google.com/http://192.168.1.42/
The URL
http://notgoogle.com/would not match.fn build(self: Self) -> MatcherConstruct a
Matcherusing the configured values.
impl Default for Builder
fn default() -> Builder
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
impl<T> Any for Builder
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Builder
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Builder
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Builder
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Builder
impl<T> WithSubscriber for Builder
impl<T, U> Into for Builder
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 Builder
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Builder
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>