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]
impl InetAddrpub fn from_std(std: &SocketAddr) -> InetAddr[src]
pub fn from_std(std: &SocketAddr) -> InetAddrpub fn new(ip: IpAddr, port: u16) -> InetAddr[src]
pub fn new(ip: IpAddr, port: u16) -> InetAddrpub fn ip(&self) -> IpAddr[src]
pub fn ip(&self) -> IpAddrGets the IP address associated with this socket address.
pub fn port(&self) -> u16[src]
pub fn port(&self) -> u16Gets the port number associated with this socket address
pub fn to_std(&self) -> SocketAddr[src]
pub fn to_std(&self) -> SocketAddrpub fn to_str(&self) -> String[src]
pub fn to_str(&self) -> StringTrait Implementations
impl Copy for InetAddr[src]
impl Copy for InetAddrimpl PartialEq for InetAddr[src]
impl PartialEq for InetAddrfn eq(&self, other: &InetAddr) -> bool[src]
fn eq(&self, other: &InetAddr) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0
[src]This method tests for !=.
impl Eq for InetAddr[src]
impl Eq for InetAddrimpl Hash for InetAddr[src]
impl Hash for InetAddrfn hash<H: Hasher>(&self, s: &mut H)[src]
fn hash<H: Hasher>(&self, s: &mut H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
[src]Feeds a slice of this type into the given [Hasher]. Read more
impl Clone for InetAddr[src]
impl Clone for InetAddrfn clone(&self) -> InetAddr[src]
fn clone(&self) -> InetAddrReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Display for InetAddr[src]
impl Display for InetAddr