parse_enum_value

Function parse_enum_value 

Source
pub fn parse_enum_value<T>(
    value: &str,
    valid_variants: &[&str],
) -> Result<T, String>
where T: FromStr + Display,
Expand description

Parse a simple enum value (case-insensitive) and return the matched variant