pub trait EnumComponent {
    // Required methods
    fn to_u32(&self) -> u32;
    fn from_u32(v: u32) -> Option<Self>
       where Self: Sized;
}
Expand description

Implemented for component values that can be used as an enum

Required Methods§

source

fn to_u32(&self) -> u32

Convert this value to a u32

source

fn from_u32(v: u32) -> Option<Self>
where Self: Sized,

Convert a u32 to this value

Implementors§