Trait packed_struct::PrimitiveEnum [] [src]

pub trait PrimitiveEnum<T> where
    T: Sized + Copy + Debug,
    Self: Sized + Copy
{ fn from_primitive(val: T) -> Option<Self>;
fn to_primitive(&self) -> T;
fn to_display_str(&self) -> &'static str;
fn from_str(s: &str) -> Option<Self>;
fn from_str_lower(s: &str) -> Option<Self>;
fn all_variants() -> &'static [Self]; }

An enum type that can be packed or unpacked from a simple primitive integer.

Required Methods

Convert from a primitive, might fail.

Convert to a primitive value.

Display value, same as the name of a particular variant.

Convert from a string value representing the variant. Case sensitive.

Convert from a string value representing the variant. Lowercase.

Important traits for &'a mut [u8]

A list all possible string variants.

Implementors