diff --git a/src/lib.rs b/src/lib.rs index 326d983..5dc33c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,13 +25,15 @@ pub const MAX_PRD_PAYLOAD_SIZE: usize = u16::MAX as usize; // 64KiB sounds reaso #[derive(Debug, PartialEq, Eq)] pub enum SpecialRoles { - DEMIURGE, + DEMIURGE, // Only valid for the first state of a process + APOPHIS, // Users in this role have the power to destroy the process } impl std::fmt::Display for SpecialRoles { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let role_str = match self { SpecialRoles::DEMIURGE => "demiurge", + SpecialRoles::APOPHIS => "apophis", }; write!(f, "{}", role_str) } @@ -43,6 +45,7 @@ impl FromStr for SpecialRoles { fn from_str(s: &str) -> Result { match s { "demiurge" => Ok(SpecialRoles::DEMIURGE), + "apophis" => Ok(SpecialRoles::APOPHIS), _ => Err(format!("Invalid role: {}", s)), } }