[][src]Enum async_listen::PeerAddr

pub enum PeerAddr {
    Tcp(SocketAddr),
    Unix(Option<PathBuf>),
}

A peer address for either Tcp or Unix socket

This enum is returned by ByteStream::peer_addr.

The enum contains Unix option even on platforms that don't support unix sockets (Windows) to make code easier to write (less #[cfg(unix)] attributes all over the code).

Variants

The peer address is TCP socket address.

The peer address is Unix socket path. None if socket is unnamed.

Trait Implementations

impl Clone for PeerAddr[src]

impl Debug for PeerAddr[src]

impl Display for PeerAddr[src]

impl Eq for PeerAddr[src]

impl Hash for PeerAddr[src]

impl PartialEq<PeerAddr> for PeerAddr[src]

impl StructuralEq for PeerAddr[src]

impl StructuralPartialEq for PeerAddr[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.