pub struct ProxySettings { /* private fields */ }
Expand description

Contains proxy settings and utilities to find which proxy to use for a given URL.

Implementations

Get a new builder for ProxySettings.

Get the proxy configuration from the environment using the curl/Unix proxy conventions.

Only ALL_PROXY, HTTP_PROXY, HTTPS_PROXY and NO_PROXY are supported. Proxies can be disabled on all requests by setting NO_PROXY to *, similar to curl. HTTP_PROXY or HTTPS_PROXY take precedence over values set by ALL_PROXY for their respective schemes.

See https://curl.se/docs/manpage.html#--noproxy

Get the proxy URL to use for the given URL.

None is returned if there is no proxy configured for the scheme or if the hostname matches a pattern in the no proxy list.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.