pub struct ProxyConfig {
pub proxy_type: ProxyType,
pub host: String,
pub port: u16,
pub username: Option<String>,
pub password: Option<String>,
}Fields§
§proxy_type: ProxyType§host: String§port: u16§username: Option<String>§password: Option<String>Implementations§
Source§impl ProxyConfig
impl ProxyConfig
pub fn new_http(host: &str, port: u16) -> Self
pub fn new_socks5(host: &str, port: u16) -> Self
pub fn with_auth(self, username: &str, password: &str) -> Self
pub fn to_url(&self) -> String
pub fn from_env() -> Option<Self>
pub fn should_bypass(&self, hostname: &str) -> bool
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnsafeUnpin for ProxyConfig
impl UnwindSafe for ProxyConfig
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