Function ipnet::ipv6_addr_from_emu128 [] [src]

pub fn ipv6_addr_from_emu128(ip: emu128) -> Ipv6Addr

Convert an emulated u128 to an Ipv6Addr.

TODO: It would be nice to implement From on Ipv6Addr for this.

Examples

use std::net::Ipv6Addr;
use std::str::FromStr;
use ipnet::ipv6_addr_from_double_u64;
assert_eq!(ipv6_addr_from_double_u64([0u64, 1u64]), Ipv6Addr::from_str("::1").unwrap());