use core::convert::TryFrom;
use crate::addressable_entity::TryFromIntError;
#[repr(u32)]
pub enum ActionType {
Deployment = 0,
KeyManagement = 1,
}
#[doc(hidden)]
impl TryFrom<u32> for ActionType {
type Error = TryFromIntError;
fn try_from(value: u32) -> Result<Self, Self::Error> {
match value {
d if d == ActionType::Deployment as u32 => Ok(ActionType::Deployment),
d if d == ActionType::KeyManagement as u32 => Ok(ActionType::KeyManagement),
_ => Err(TryFromIntError(())),
}
}
}