pub fn parse_enum( name: &str, s: &str, allowed: &[&str], ) -> Result<usize, String>
Returns the index of the matched option from allowed