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 InetAddr
pub fn from_std(std: &SocketAddr) -> InetAddr
[src]
pub fn from_std(std: &SocketAddr) -> InetAddr
pub fn new(ip: IpAddr, port: u16) -> InetAddr
[src]
pub fn new(ip: IpAddr, port: u16) -> InetAddr
pub fn ip(&self) -> IpAddr
[src]
pub fn ip(&self) -> IpAddr
Gets the IP address associated with this socket address.
pub fn port(&self) -> u16
[src]
pub fn port(&self) -> u16
Gets the port number associated with this socket address
pub fn to_std(&self) -> SocketAddr
[src]
pub fn to_std(&self) -> SocketAddr
pub fn to_str(&self) -> String
[src]
pub fn to_str(&self) -> String
Trait Implementations
impl Copy for InetAddr
[src]
impl Copy for InetAddr
impl PartialEq for InetAddr
[src]
impl PartialEq for InetAddr
fn eq(&self, other: &InetAddr) -> bool
[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[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Eq for InetAddr
[src]
impl Eq for InetAddr
impl Hash for InetAddr
[src]
impl Hash for InetAddr
fn 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 InetAddr
fn clone(&self) -> InetAddr
[src]
fn clone(&self) -> InetAddr
Returns 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