Trait Enum
qapi_spec
pub unsafe trait Enum: DeserializeOwned + FromStr + Copy + 'static { pub const COUNT: usize; pub const VARIANTS: &'static [Self]; pub const NAMES: &'static [&'static str]; pub fn discriminant(&self) -> usize; pub fn name(&self) -> &'static str { ... } pub fn from_name(s: &str) -> Option<Self> { ... } }
pub const COUNT: usize
pub const VARIANTS: &'static [Self]
pub const NAMES: &'static [&'static str]
pub fn discriminant(&self) -> usize
pub fn name(&self) -> &'static str
pub fn from_name(s: &str) -> Option<Self>