Enum nix::sys::socket::SockAddr [] [src]

pub enum SockAddr {
    Inet(InetAddr),
    Unix(UnixAddr),
}

Represents a socket address

Variants

Inet
Unix

Methods

impl SockAddr

fn new_inet(addr: InetAddr) -> SockAddr

fn new_unix<P: ?Sized + NixPath>(path: &P) -> Result<SockAddr>

fn family(&self) -> AddressFamily

fn to_str(&self) -> String

unsafe fn as_ffi_pair(&self) -> (&sockaddr, socklen_t)

Trait Implementations

impl PartialEq for SockAddr

fn eq(&self, other: &SockAddr) -> bool

fn ne(&self, other: &Rhs) -> bool

impl Eq for SockAddr

impl Hash for SockAddr

fn hash<H: Hasher>(&self, s: &mut H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Clone for SockAddr

fn clone(&self) -> SockAddr

fn clone_from(&mut self, source: &Self)

impl Display for SockAddr

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Copy for SockAddr