[−][src]Enum rtdlib::types::ProxyType
Describes the type of a proxy server
Variants
Http(ProxyTypeHttp)
A HTTP transparent proxy server
Mtproto(ProxyTypeMtproto)
An MTProto proxy server
Socks5(ProxyTypeSocks5)
A SOCKS5 proxy server
Implementations
impl ProxyType
[src]
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
[src]
pub fn is_http(&self) -> bool
[src]
pub fn is_mtproto(&self) -> bool
[src]
pub fn is_socks5(&self) -> bool
[src]
pub fn on_http<F: FnOnce(&ProxyTypeHttp)>(&self, fnc: F) -> &Self
[src]
pub fn on_mtproto<F: FnOnce(&ProxyTypeMtproto)>(&self, fnc: F) -> &Self
[src]
pub fn on_socks5<F: FnOnce(&ProxyTypeSocks5)>(&self, fnc: F) -> &Self
[src]
pub fn as_http(&self) -> Option<&ProxyTypeHttp>
[src]
pub fn as_mtproto(&self) -> Option<&ProxyTypeMtproto>
[src]
pub fn as_socks5(&self) -> Option<&ProxyTypeSocks5>
[src]
pub fn http<T: AsRef<ProxyTypeHttp>>(t: T) -> Self
[src]
pub fn mtproto<T: AsRef<ProxyTypeMtproto>>(t: T) -> Self
[src]
pub fn socks5<T: AsRef<ProxyTypeSocks5>>(t: T) -> Self
[src]
Trait Implementations
impl AsRef<ProxyType> for ProxyType
[src]
impl Clone for ProxyType
[src]
impl Debug for ProxyType
[src]
impl Default for ProxyType
[src]
impl<'de> Deserialize<'de> for ProxyType
[src]
fn deserialize<D>(deserializer: D) -> Result<ProxyType, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl RObject for ProxyType
[src]
impl Serialize for ProxyType
[src]
Auto Trait Implementations
impl RefUnwindSafe for ProxyType
impl Send for ProxyType
impl Sync for ProxyType
impl Unpin for ProxyType
impl UnwindSafe for ProxyType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,