1 2 3 4 5 6 7 8 9 10 11 12 13 14
use std::rc::Rc; #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct RuleName(Rc<str>); impl RuleName { pub fn new(name: &str) -> Self { Self(Rc::from(name)) } pub fn as_str(&self) -> &str { &self.0 } }