Function ipnet::ipv6_addr_into_double_u64 [] [src]

pub fn ipv6_addr_into_double_u64(ip: Ipv6Addr) -> [u64; 2]

Convert an Ipv6Addr to a [u64; 2] slice.

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_into_double_u64;
assert_eq!(ipv6_addr_into_double_u64(Ipv6Addr::from_str("::1").unwrap()), [0u64, 1u64]);