pub trait EnumVariantsStrings: Sized {
    // Required methods
    fn from_str(input: &str) -> Result<Self, &[&str]>;
    fn to_str(&self) -> &'static str;
}

Required Methods§

source

fn from_str(input: &str) -> Result<Self, &[&str]>

Returns a instance of variant of Self which matches input if exists, else returns possible matches

source

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

Returns the string representation of selfs variant

Object Safety§

This trait is not object safe.

Implementors§