Trait c_enum::CEnum

source ·
pub trait CEnum: From<Self::Inner> + Into<Self::Inner> {
    type Inner;

    // Required method
    fn variant_label(&self) -> Option<&'static str>
       where Self::Inner: PartialEq;
}
Expand description

A trait that is automatically implemented for all C enums.

Required Associated Types§

source

type Inner

The inner type of this enum.

Required Methods§

source

fn variant_label(&self) -> Option<&'static str>where Self::Inner: PartialEq,

Get the string name corresponding to the current value, if there is one.

Implementors§

source§

impl CEnum for Enum

§

type Inner = u64