Skip to main content

enumerated

Function enumerated 

Source
pub fn enumerated(key: &str, allowed: &[&'static str]) -> Value<&'static str>
Expand description

One of a fixed set of words, compared case-insensitively.

Git has no --type for this, so the value is read raw and checked here — which means this is the one reader whose Bad message is ours. It names every accepted spelling, because a rejection that does not say what was wanted sends the reader to the documentation for a list we already hold.