[][src]Trait qapi_spec::Enum

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

Associated Constants

pub const COUNT: usize[src]

pub const VARIANTS: &'static [Self][src]

pub const NAMES: &'static [&'static str][src]

Loading content...

Required methods

pub fn discriminant(&self) -> usize[src]

Loading content...

Provided methods

pub fn name(&self) -> &'static str[src]

pub fn from_name(s: &str) -> Option<Self>[src]

Loading content...

Implementors

Loading content...