pub struct Proxy { /* private fields */ }
Expand description
Proxy server definition
Implementations§
source§impl 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
: HTTPsocks4
: 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 StructuralPartialEq for Proxy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.