1use crate::{atom::Atom, cell::Cell, noun::Noun};
4
5macro_rules! impl_marker {
6 ($trait:ty, $type:ty) => {
7 impl $trait for $type {}
8 impl $trait for &$type {}
9 impl $trait for std::boxed::Box<$type> {}
10 impl $trait for std::rc::Rc<$type> {}
11 impl $trait for std::sync::Arc<$type> {}
12 };
13}
14
15pub trait Atomish {}
17
18impl_marker!(Atomish, Atom);
19
20pub trait Cellish {}
22
23impl_marker!(Cellish, Cell);
24
25pub trait Nounish {}
27
28impl_marker!(Nounish, Atom);
29impl_marker!(Nounish, Cell);
30impl_marker!(Nounish, Noun);