Add PartialOrd and Ord instances for network types.

This commit is contained in:
Lana Black
2017-05-16 10:34:11 +00:00
parent cdd3dff549
commit ab7d5b32d0
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ const IPV6_BITS: u8 = 128;
const IPV6_SEGMENT_BITS: u8 = 16;
/// Represents a network range where the IP addresses are of v6
#[derive(Debug,Clone,Copy,Hash,PartialEq,Eq)]
#[derive(Debug,Clone,Copy,Hash,PartialEq,Eq,PartialOrd,Ord)]
pub struct Ipv6Network {
addr: Ipv6Addr,
prefix: u8,