1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum CacheKind { Normal, Device, NoCache, } impl CacheKind { pub fn mair_idx(&self) -> u64 { match self { CacheKind::Device => 0, CacheKind::Normal => 1, CacheKind::NoCache => 2, } } }