use crate::lib_enum;
use crate::result::{Error, Result};
lib_enum! {
PartitionAccess: u8 {
default: NoAccess,
error: Error,
NoAccess = 0x0,
BootPart1 = 0x1,
BootPart2 = 0x2,
Rpmb = 0x3,
GeneralPart1 = 0x4,
GeneralPart2 = 0x5,
GeneralPart3 = 0x6,
GeneralPart4 = 0x7,
}
}
impl PartitionAccess {
pub const fn try_from_inner(val: u8) -> Result<Self> {
Self::from_raw(val)
}
pub const fn into_inner(self) -> u8 {
self.into_raw()
}
}