pub struct ProxyOptions {
pub enabled: bool,
pub proxy_type: ProxyType,
pub host: Option<String>,
pub port: Option<u16>,
pub username: Option<String>,
pub password: Option<String>,
}Expand description
Outbound proxy configuration applied when building the reqwest client.
Fields§
§enabled: boolWhether proxy is enabled.
proxy_type: ProxyTypeProxy type.
host: Option<String>Proxy host.
port: Option<u16>Proxy port.
username: Option<String>Proxy username.
password: Option<String>Proxy password.
Implementations§
Source§impl ProxyOptions
impl ProxyOptions
Sourcepub fn from_config<R>(config: &R) -> Result<Self, HttpConfigError>where
R: ConfigReader + ?Sized,
pub fn from_config<R>(config: &R) -> Result<Self, HttpConfigError>where
R: ConfigReader + ?Sized,
Reads proxy settings from config using relative keys.
§Parameters
config: AnyConfigReader(e.g.config.prefix_view("proxy")).
Keys read:
enabledproxy_typehostportusernamepassword
§Returns
Populated ProxyOptions or HttpConfigError.
Trait Implementations§
Source§impl Clone for ProxyOptions
impl Clone for ProxyOptions
Source§fn clone(&self) -> ProxyOptions
fn clone(&self) -> ProxyOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyOptions
impl Debug for ProxyOptions
Source§impl PartialEq for ProxyOptions
impl PartialEq for ProxyOptions
impl Eq for ProxyOptions
impl StructuralPartialEq for ProxyOptions
Auto Trait Implementations§
impl Freeze for ProxyOptions
impl RefUnwindSafe for ProxyOptions
impl Send for ProxyOptions
impl Sync for ProxyOptions
impl Unpin for ProxyOptions
impl UnsafeUnpin for ProxyOptions
impl UnwindSafe for ProxyOptions
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§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.