[][src]Trait qapi_spec::Enum

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> { ... } }

Associated Constants

Loading content...

Required methods

fn discriminant(&self) -> usize

Loading content...

Provided methods

fn name(&self) -> &'static str

fn from_name(s: &str) -> Option<Self>

Loading content...

Implementors

Loading content...