pub fn normalize_string_enum_set_selection<T>(
value: &str,
key: &str,
item_name: &str,
authoritative_order: &[T],
parse: impl Fn(&str) -> Option<T>,
display: impl Fn(T) -> &'static str,
) -> Result<Vec<&'static str>>Expand description
Parses and normalizes a string enum set into authoritative order.
This is useful for string_enum_set config values whose storage order should
stay stable regardless of the order provided by an API request. The returned
values are the canonical storage strings from display.