/// Represents an index into the value table.
////// This is a self-rolled option type to signal a missing value without extra space.
/// We use the highest representable value to signal `None` so we don't have to subtract.
#[repr(transparent)]#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd)]pub(crate)structValueIndex(u32);implValueIndex{pub(crate)constNONE:Self=Self(u32::MAX);pub(crate)fnnew(index:u32)->Self{Self(index)}pub(crate)fnis_some(self)->bool{self!=Self::NONE}pub(crate)fnget(self)->Option<usize>{(self.is_some()).then_some(self.0asusize)}pub(crate)fndecrement(&mutself){ifself.is_some(){self.0-=1;}}}