use crate::{AtomId, AtomRoot, Readable}; use std::cell::RefCell; pub struct AtomRefBuilder; pub struct AtomRef(pub fn(AtomRefBuilder) -> T); impl Readable> for &'static AtomRef { fn read(&self, _root: AtomRoot) -> Option> { todo!() } fn init(&self) -> RefCell { RefCell::new(self.0(AtomRefBuilder)) } fn unique_id(&self) -> AtomId { *self as *const AtomRef as *const () } } #[test] fn atom_compiles() { static TEST_ATOM: AtomRef> = AtomRef(|_| vec![]); dbg!((&TEST_ATOM).init()); }