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§
fn variants() -> &'static [Self]
fn val_to_str(&self) -> &'static str
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.