13 lines
253 B
Rust
13 lines
253 B
Rust
#[derive(Debug, Copy, Clone)]
|
|
pub enum IpType { V4, V6 }
|
|
|
|
impl ToString for IpType {
|
|
fn to_string(&self) -> String {
|
|
match self {
|
|
Self::V4 => String::from("IPv4"),
|
|
Self::V6 => String::from("IPv6"),
|
|
}
|
|
}
|
|
}
|
|
|