pub enum Proxy {
HTTP(HTTPProxy),
HTTPS(HTTPSProxy),
SOCKS4(SOCKS4Proxy),
SOCKS5(SOCKS5Proxy),
}Variants§
Implementations§
Source§impl Proxy
impl Proxy
Sourcepub fn get_auth(&self) -> Option<&BasicAuthentication>
pub fn get_auth(&self) -> Option<&BasicAuthentication>
Returns auth credentials in an Option. Some protocols (i.e. SOCKS4) don’t support authentication at all, it will always return None in that case.
Sourcepub fn get_scheme(&self) -> &str
pub fn get_scheme(&self) -> &str
Gets the URL scheme of this Proxy in lowercase.
Usually it only matters what variant of Proxy (i.e. HTTP, HTTPS) you’re using for the result,
but in the case of Proxy::SOCKS5, h is appended to the end if SOCKS5Proxy.h is true.
And it’s the same thing for Proxy::SOCKS4, but a instead of h
(and if SOCKS4Proxy.h is true).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Proxy
impl RefUnwindSafe for Proxy
impl Send for Proxy
impl Sync for Proxy
impl Unpin for Proxy
impl UnwindSafe for Proxy
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