1 2 3 4 5 6 7 8 9 10 11 12
#[derive(Debug, Clone, PartialEq, Eq)] pub struct NotNull { pub name: Option<String>, } impl NotNull { pub fn new(name: Option<&str>) -> Self { Self { name: name.map(str::to_string), } } }