reaction/plugins/reaction-plugin-nftables/src/helpers.rs
ppom 26cf3a96e7
First draft of an nftables plugin
Not compiling yet but I'm getting there.
Must be careful on the unsafe, C-wrapping code!
2026-02-20 12:00:00 +01:00

15 lines
346 B
Rust

use std::fmt::Display;
#[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone)]
pub enum Version {
IPv4,
IPv6,
}
impl Display for Version {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(match self {
Version::IPv4 => "IPv4",
Version::IPv6 => "IPv6",
})
}
}