pub struct Proxy { /* private fields */ }Expand description
the proxies of a client: one per scheme, and the hosts that go direct
Implementations§
Source§impl Proxy
impl Proxy
Sourcepub fn new(url: &str) -> Option<Proxy>
pub fn new(url: &str) -> Option<Proxy>
one proxy for http and https (Endpoint::parse) -> None when it is not one
Sourcepub fn no_proxy(self, list: &str) -> Proxy
pub fn no_proxy(self, list: &str) -> Proxy
hosts that go direct: a comma-separated list as NO_PROXY writes it (entries that are not one are left out)
Sourcepub fn from_env() -> Option<Proxy>
pub fn from_env() -> Option<Proxy>
the proxies the environment names (see the module header); None when it names none
Sourcepub fn from_vars(get: &dyn Fn(&str) -> Option<String>) -> Option<Proxy>
pub fn from_vars(get: &dyn Fn(&str) -> Option<String>) -> Option<Proxy>
from_env with the variables from get (tests, or a configuration of the app’s own)
Trait Implementations§
impl Eq for Proxy
impl StructuralPartialEq for Proxy
Auto Trait Implementations§
impl Forget for Proxy
impl Freeze for Proxy
impl Move for Proxy
impl RefUnwindSafe for Proxy
impl Send for Proxywhere
RawVecInner: Send,
impl Sync for Proxywhere
RawVecInner: Sync,
impl Unpin for Proxy
impl UnsafeUnpin for Proxywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<NoProxy>: UnsafeUnpin,
impl UnwindSafe for Proxywhere
RawVecInner: UnwindSafe,
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