ip/concrete/mask/types.rs
1use core::fmt::Debug;
2use core::hash::Hash;
3
4/// Marker trait for types of IP address mask.
5pub trait Type: Copy + Debug + Hash + PartialEq + Eq {}
6
7/// A "net"-mask, used to mask the network identifier bits of an IP address.
8#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
9pub enum Net {}
10impl Type for Net {}
11
12/// A "host"-mask, used to mask the host identifier bits of an IP address.
13#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
14pub enum Host {}
15impl Type for Host {}
16
17/// A general bit-mask, used to perform arbitrary bit-wise arithmitic.
18#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
19pub enum Bit {}
20impl Type for Bit {}