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

pub enum InetAddr {
    V4(sockaddr_in),
    V6(sockaddr_in6),
}

Variants

V4
V6

Methods

impl InetAddr

fn from_std(std: &SocketAddr) -> InetAddr

fn new(ip: IpAddr, port: u16) -> InetAddr

fn ip(&self) -> IpAddr

Gets the IP address associated with this socket address.

fn port(&self) -> u16

Gets the port number associated with this socket address

fn to_std(&self) -> SocketAddr

fn to_str(&self) -> String

Trait Implementations

impl PartialEq for InetAddr

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

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

impl Eq for InetAddr

impl Hash for InetAddr

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

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

impl Clone for InetAddr

fn clone(&self) -> InetAddr

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

impl Display for InetAddr

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

Derived Implementations

impl Copy for InetAddr