use {crate::clonecell::CloneCell, std::rc::Rc}; pub struct Opt { t: CloneCell>>, } impl Default for Opt { fn default() -> Self { Self { t: Default::default(), } } } impl Opt { pub fn set(&self, t: Option>) { self.t.set(t); } pub fn get(&self) -> Option> { self.t.get() } pub fn is_none(&self) -> bool { self.t.is_none() } }