Enum deltachat::net::proxy::ProxyConfig
source · pub enum ProxyConfig {
Http(HttpConfig),
Https(HttpConfig),
Socks5(Socks5Config),
Shadowsocks(ShadowsocksConfig),
}
Variants§
Implementations§
source§impl ProxyConfig
impl ProxyConfig
sourcepub(crate) fn from_url(url: &str) -> Result<Self>
pub(crate) fn from_url(url: &str) -> Result<Self>
Creates a new proxy configuration by parsing given proxy URL.
sourcepub(crate) fn to_url(&self) -> String
pub(crate) fn to_url(&self) -> String
Serializes proxy config into an URL.
This function can be used to normalize proxy URL by parsing it and serializing back.
sourceasync fn migrate_socks_config(sql: &Sql) -> Result<()>
async fn migrate_socks_config(sql: &Sql) -> Result<()>
Migrates legacy socks5_host
, socks5_port
, socks5_user
and socks5_password
config into proxy_url
if proxy_url
is unset or empty.
Unsets socks5_host
, socks5_port
, socks5_user
and socks5_password
in any case.
Trait Implementations§
source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
Returns a copy 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 ProxyConfig
impl Debug for ProxyConfig
source§impl PartialEq for ProxyConfig
impl PartialEq for ProxyConfig
impl Eq for ProxyConfig
impl StructuralPartialEq for ProxyConfig
Auto Trait Implementations§
impl Freeze for ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnwindSafe for ProxyConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.