#[derive(Debug, Clone, PartialEq)] pub struct Handle(String); impl Handle { pub fn parse(raw: &str) -> Result<Self, &'static str> { let s = raw.trim().trim_start_matches('@'); if s.is_empty() || s.len() > 20 { return Err("length"); } if !s.chars().all(|c| c.is_ascii_alphanumeric() || c == '_') { return Err("charset"); } Ok(Handle(s.to_ascii_lowercase())) } }