IStrEnum

Trait IStrEnum 

Source
pub trait IStrEnum: Sized {
    // Required methods
    fn variants() -> &'static [Self];
    fn val_to_str(&self) -> &'static str;
    fn str_to_val(src: &str) -> Result<Self, InvalidEnumValue<String>>;
}

Required Methods§

Source

fn variants() -> &'static [Self]

Source

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

Source

fn str_to_val(src: &str) -> Result<Self, InvalidEnumValue<String>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§