#[derive(serde::Serialize, serde::Deserialize, Clone, Copy, Debug)] pub struct XMLUuid(pub uuid::Uuid); impl XMLUuid { pub fn parse_from_str(s: &str) -> anyhow::Result { Ok(Self(uuid::Uuid::parse_str(s)?)) } pub fn new_random() -> Self { Self(uuid::Uuid::new_v4()) } pub fn as_string(&self) -> String { self.0.to_string() } pub fn is_valid(&self) -> bool { log::debug!("UUID version ({}): {}", self.0, self.0.get_version_num()); self.0.get_version_num() == 4 } } pub mod domain; pub mod network; pub mod nwfilter;