pub enum Proxy<T> {
No,
System,
Custom(T),
}Expand description
Proxy configuration for outgoing HTTP requests.
Supports no proxy, system-configured proxy, or a custom proxy URL.
The Custom variant is unconstrained but is typically used with string-like types.
Variants§
Implementations§
Source§impl<T> Proxy<T>
impl<T> Proxy<T>
Sourcepub fn map<U>(self, f: impl FnOnce(T) -> U) -> Proxy<U>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Proxy<U>
Transform the inner custom value, leaving Proxy::No and
Proxy::System unchanged.
Trait Implementations§
impl<T: Copy> Copy for Proxy<T>
impl<T: Eq> Eq for Proxy<T>
impl<T: PartialEq> StructuralPartialEq for Proxy<T>
Auto Trait Implementations§
impl<T> Freeze for Proxy<T>where
T: Freeze,
impl<T> RefUnwindSafe for Proxy<T>where
T: RefUnwindSafe,
impl<T> Send for Proxy<T>where
T: Send,
impl<T> Sync for Proxy<T>where
T: Sync,
impl<T> Unpin for Proxy<T>where
T: Unpin,
impl<T> UnsafeUnpin for Proxy<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Proxy<T>where
T: 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