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

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

Variants

V4(sockaddr_in)V6(sockaddr_in6)

Methods

impl InetAddr
[src]

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 Copy for InetAddr
[src]

impl PartialEq for InetAddr
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl Eq for InetAddr
[src]

impl Hash for InetAddr
[src]

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

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

impl Clone for InetAddr
[src]

fn clone(&self) -> InetAddr

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Display for InetAddr
[src]

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

Formats the value using the given formatter.