pub struct PrivacyContext { /* private fields */ }Expand description
Shared privacy and cache policy applied through crate::ConnectionParameters.
Implementations§
Source§impl PrivacyContext
impl PrivacyContext
Sourcepub fn new(description: &str) -> Result<Self, NetworkError>
pub fn new(description: &str) -> Result<Self, NetworkError>
Create a named privacy context.
Sourcepub fn default_context() -> Self
pub fn default_context() -> Self
Copy the process-global default privacy context.
Sourcepub fn flush_cache(&self)
pub fn flush_cache(&self)
Flush any caches associated with the context.
Sourcepub fn disable_logging(&self)
pub fn disable_logging(&self)
Disable Network.framework logging for this context.
Sourcepub fn require_encrypted_name_resolution(
&self,
required: bool,
fallback: Option<&ResolverConfig>,
)
pub fn require_encrypted_name_resolution( &self, required: bool, fallback: Option<&ResolverConfig>, )
Require encrypted DNS resolution, optionally with a fallback encrypted resolver.
Sourcepub fn add_proxy(&self, proxy: &ProxyConfig)
pub fn add_proxy(&self, proxy: &ProxyConfig)
Add a proxy configuration to the privacy context.
Sourcepub fn clear_proxies(&self)
pub fn clear_proxies(&self)
Clear all proxy configurations from the context.
Trait Implementations§
Source§impl Clone for PrivacyContext
impl Clone for PrivacyContext
Source§impl Debug for PrivacyContext
impl Debug for PrivacyContext
Source§impl Drop for PrivacyContext
impl Drop for PrivacyContext
impl Send for PrivacyContext
impl Sync for PrivacyContext
Auto Trait Implementations§
impl Freeze for PrivacyContext
impl RefUnwindSafe for PrivacyContext
impl Unpin for PrivacyContext
impl UnsafeUnpin for PrivacyContext
impl UnwindSafe for PrivacyContext
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