pub struct Builder { /* private fields */ }
Expand description
A builder to create a Matcher
.
Construct with Matcher::builder()
.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn all<S>(self, val: S) -> Selfwhere
S: IntoValue,
pub fn all<S>(self, val: S) -> Selfwhere
S: IntoValue,
Set the target proxy for all destinations.
Sourcepub fn http<S>(self, val: S) -> Selfwhere
S: IntoValue,
pub fn http<S>(self, val: S) -> Selfwhere
S: IntoValue,
Set the target proxy for HTTP destinations.
Sourcepub fn https<S>(self, val: S) -> Selfwhere
S: IntoValue,
pub fn https<S>(self, val: S) -> Selfwhere
S: IntoValue,
Set the target proxy for HTTPS destinations.
Sourcepub fn no<S>(self, val: S) -> Selfwhere
S: IntoValue,
pub fn no<S>(self, val: S) -> Selfwhere
S: IntoValue,
Set 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.com
and.google.com
are 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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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