Skip to main content

parse_required_value_flag

Function parse_required_value_flag 

Source
pub fn parse_required_value_flag(
    args: &[String],
    command: &str,
    flag: &str,
) -> Result<Option<String>, ArgParseError>
Expand description

Scan for a --flag value pair the caller treats as required.

This has the same scanning behavior as parse_optional_value_flag — “required” is enforced by the caller inspecting the None case, keeping this helper’s error wording identical for both required and optional call sites.