Enum tor_socksproto::SocksAddr
source · [−]pub enum SocksAddr {
Hostname(SocksHostname),
Ip(IpAddr),
}
Expand description
An address sent or received as part of a SOCKS handshake
Variants
Hostname(SocksHostname)
A regular DNS hostname.
Ip(IpAddr)
An IP address. (Tor doesn’t like to receive these during SOCKS handshakes, since they usually indicate that the hostname lookup happened somewhere else.)
Trait Implementations
sourceimpl Writeable for SocksAddr
impl Writeable for SocksAddr
sourcefn write_onto<W: Writer + ?Sized>(&self, w: &mut W)
fn write_onto<W: Writer + ?Sized>(&self, w: &mut W)
Encode this object into the writer b
.
impl Eq for SocksAddr
impl StructuralEq for SocksAddr
impl StructuralPartialEq for SocksAddr
Auto Trait Implementations
impl RefUnwindSafe for SocksAddr
impl Send for SocksAddr
impl Sync for SocksAddr
impl Unpin for SocksAddr
impl UnwindSafe for SocksAddr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<W> WriteableOnce for W where
W: Writeable,
impl<W> WriteableOnce for W where
W: Writeable,
sourcepub fn write_into<B>(self, b: &mut B) where
B: Writer + ?Sized,
pub fn write_into<B>(self, b: &mut B) where
B: Writer + ?Sized,
Encode this object into the writer b
, and consume it.