[−][src]Function dqcsim::common::util::friendly_enum_parse
pub fn friendly_enum_parse<E, I>(s: &str) -> Result<E> where
E: FromStr + IntoEnumIterator<Iterator = I> + Display,
I: Iterator<Item = E>,
Parses a string representing an enum variant into the variant.
This uses fuzzy matching: case doesn't matter, and it is sufficient to only list the first few characters (just enough to not be ambiguous). The error messages generated are user-friendly as well.