pub fn toOem(memtype: MemoryType) ?Oem memtype: MemoryType72
73
74
75
76
77
78 pub fn toOem(memtype: MemoryType) ?Oem {
const as_int = @backingInt(memtype);
const oem_start = @backingInt(MemoryType.oem_start);
if (as_int < oem_start) return null;
if (as_int > @backingInt(MemoryType.oem_end)) return null;
return @truncate(as_int - oem_start);
}