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§
source§impl PartialEq for Proxy
impl PartialEq for Proxy
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