1 2 3 4 5 6 7 8 9 10 11 12
use derive_more::From; #[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd, From)] pub struct Pointer (pub IndexType); pub type IndexType = u16; impl Pointer { pub const fn index (&self) -> usize { self.0 as usize } }