pub struct Proxy { /* private fields */ }
Expand description
Proxy server definition
Implementations
sourceimpl Proxy
impl Proxy
sourcepub fn new<S: AsRef<str>>(proxy: S) -> Result<Self, Error>
pub fn new<S: AsRef<str>>(proxy: S) -> Result<Self, Error>
Create a proxy from a format string.
Arguments:
proxy
- a str of format<protocol>://<user>:<password>@<host>:port
. All parts except host are optional.
Protocols
http
: HTTP Connectsocks4
: SOCKS4 (requires socks feature)socks4a
: SOCKS4A (requires socks feature)socks5
andsocks
: SOCKS5 (requires socks feature)
Examples
http://127.0.0.1:8080
socks5://john:smith@socks.google.com
john:smith@socks.google.com:8000
localhost
Trait Implementations
impl Eq for Proxy
impl StructuralEq for Proxy
impl StructuralPartialEq for Proxy
Auto Trait Implementations
impl RefUnwindSafe for Proxy
impl Send for Proxy
impl Sync for Proxy
impl Unpin for Proxy
impl UnwindSafe for Proxy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.