Enum nix::sys::socket::IpAddr
[−]
[src]
pub enum IpAddr {
V4(Ipv4Addr),
V6(Ipv6Addr),
}Variants
V4(Ipv4Addr)V6(Ipv6Addr)
Methods
impl IpAddr[src]
pub fn new_v4(a: u8, b: u8, c: u8, d: u8) -> IpAddr[src]
Create a new IpAddr that contains an IPv4 address.
The result will represent the IP address a.b.c.d
pub fn new_v6(
a: u16,
b: u16,
c: u16,
d: u16,
e: u16,
f: u16,
g: u16,
h: u16
) -> IpAddr[src]
a: u16,
b: u16,
c: u16,
d: u16,
e: u16,
f: u16,
g: u16,
h: u16
) -> IpAddr
Create a new IpAddr that contains an IPv6 address.
The result will represent the IP address a:b:c:d:e:f
Trait Implementations
impl Display for IpAddr[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more