use crate::lib_enum;
use crate::result::{Error, Result};
lib_enum! {
AccessTimeValue: u8 {
default: Value10,
error: Error,
Value10 = 0x1,
}
}
impl AccessTimeValue {
pub const fn value(&self) -> f32 {
match self {
Self::Value10 => 1.0,
}
}
pub const fn value_int(&self) -> u32 {
match self {
Self::Value10 => 10,
}
}
pub const fn try_from_inner(val: u8) -> Result<Self> {
Self::from_raw(val)
}
pub const fn into_inner(self) -> u8 {
self.into_raw()
}
}