pub struct Endpoint {
pub host: String,
pub port: u16,
/* private fields */
}Expand description
a proxy server: where to connect and the credentials it gets (Basic)
Fields§
§host: String§port: u16Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn parse(s: &str) -> Option<Endpoint>
pub fn parse(s: &str) -> Option<Endpoint>
“http://[user[:password]@]host[:port][/]” or “host[:port]” (http assumed); the port defaults to 80. None for another scheme (https://, socks5://), a path, or a bad host
Sourcepub fn with_auth(self, user: &str, password: &str) -> Endpoint
pub fn with_auth(self, user: &str, password: &str) -> Endpoint
with these credentials (Basic: “user:password” in base64)
the Proxy-Authorization header’s value
Trait Implementations§
impl Eq for Endpoint
impl StructuralPartialEq for Endpoint
Auto Trait Implementations§
impl Forget for Endpoint
impl Freeze for Endpoint
impl Move for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpointwhere
RawVecInner: Send,
impl Sync for Endpointwhere
RawVecInner: Sync,
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
impl UnwindSafe for Endpointwhere
RawVecInner: 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