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