use crate::DomainError; #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ModuleName(String); impl ModuleName { pub fn new(value: &str) -> Result { let trimmed = value.trim(); if trimmed.is_empty() { return Err(DomainError::EmptyValue("ModuleName")); } Ok(Self(trimmed.to_string())) } pub fn as_str(&self) -> &str { &self.0 } }