pub enum SocketAddr {
    Tcp(SocketAddr),
    Unix(String),
}Expand description
Generalization of the std::net::SocketAddr for Tor communication. Clients can communicate with the Tor server either through the standard TCP connection, or through a Unix socket.
Variants§
Tcp(SocketAddr)
Unix(String)
Trait Implementations§
source§impl Clone for SocketAddr
 
impl Clone for SocketAddr
source§fn clone(&self) -> SocketAddr
 
fn clone(&self) -> SocketAddr
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 SocketAddr
 
impl Debug for SocketAddr
source§impl<'de> Deserialize<'de> for SocketAddr
 
impl<'de> Deserialize<'de> for SocketAddr
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for SocketAddr
 
impl Display for SocketAddr
source§impl From<SocketAddr> for SocketAddr
 
impl From<SocketAddr> for SocketAddr
Convert from a std::net::SocketAddr to this
source§fn from(socket_addr: TcpSocketAddr) -> SocketAddr
 
fn from(socket_addr: TcpSocketAddr) -> SocketAddr
Converts to this type from the input type.
source§impl FromStr for SocketAddr
 
impl FromStr for SocketAddr
source§impl Ord for SocketAddr
 
impl Ord for SocketAddr
source§fn cmp(&self, other: &SocketAddr) -> Ordering
 
fn cmp(&self, other: &SocketAddr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SocketAddr
 
impl PartialEq for SocketAddr
source§fn eq(&self, other: &SocketAddr) -> bool
 
fn eq(&self, other: &SocketAddr) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for SocketAddr
 
impl PartialOrd for SocketAddr
source§fn partial_cmp(&self, other: &SocketAddr) -> Option<Ordering>
 
fn partial_cmp(&self, other: &SocketAddr) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moresource§impl Serialize for SocketAddr
 
impl Serialize for SocketAddr
impl Eq for SocketAddr
impl StructuralEq for SocketAddr
impl StructuralPartialEq for SocketAddr
Auto Trait Implementations§
impl RefUnwindSafe for SocketAddr
impl Send for SocketAddr
impl Sync for SocketAddr
impl Unpin for SocketAddr
impl UnwindSafe for SocketAddr
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