pub struct NetworkConfig { /* private fields */ }Expand description
Proxy, TLS, and network-status policy; defaults to direct connections and WebPKI roots.
Use crate::OpenNet::new_with_network_config for the engine default or
crate::OpenNet::create_ws_client_with_network_config for a client override.
Passing NetworkConfig::default() explicitly selects direct connections and
the built-in trust roots; clone an existing value when changing one setting.
Implementations§
Source§impl NetworkConfig
impl NetworkConfig
Sourcepub fn with_proxy(self, proxy: ProxyConfig) -> Self
pub fn with_proxy(self, proxy: ProxyConfig) -> Self
Replaces the proxy policy.
Sourcepub fn with_network_status_policy(self, policy: NetworkStatusPolicy) -> Self
pub fn with_network_status_policy(self, policy: NetworkStatusPolicy) -> Self
Selects how connections respond to network-monitor state changes.
The default is NetworkStatusPolicy::Ignore.
Sourcepub fn proxy(&self) -> &ProxyConfig
pub fn proxy(&self) -> &ProxyConfig
Returns the current proxy policy by reference without exposing credentials.
Sourcepub fn network_status_policy(&self) -> NetworkStatusPolicy
pub fn network_status_policy(&self) -> NetworkStatusPolicy
Returns the policy used when monitor reachability changes.
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Auto Trait Implementations§
impl !RefUnwindSafe for NetworkConfig
impl !UnwindSafe for NetworkConfig
impl Freeze for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnsafeUnpin for NetworkConfig
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