#[non_exhaustive]pub struct ProxyInfo {
pub url: Url,
pub hostname: String,
pub port: u16,
pub username: Option<String>,
pub password: Option<String>,
pub tier: Option<u8>,
pub session_id: Option<SessionId>,
}Expand description
Parsed connection details for a selected proxy.
use millipede_core::proxy::ProxyInfo;
let info = ProxyInfo::from_url(url::Url::parse("http://proxy.example:8080")?);
assert_eq!(info.port, 8080);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.url: UrlComplete proxy URL.
hostname: StringProxy host name.
port: u16Explicit or scheme-default port.
username: Option<String>Optional non-empty username.
password: Option<String>Optional password.
tier: Option<u8>Tier that supplied this proxy.
session_id: Option<SessionId>Session associated with the resolution request.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ProxyInfo
Auto Trait Implementations§
impl Freeze for ProxyInfo
impl RefUnwindSafe for ProxyInfo
impl Send for ProxyInfo
impl Sync for ProxyInfo
impl Unpin for ProxyInfo
impl UnsafeUnpin for ProxyInfo
impl UnwindSafe for ProxyInfo
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