Skip to main content

parse_value

Function parse_value 

Source
pub fn parse_value(
    kind: &ParamKind,
    raw: &str,
) -> Result<ParamValue, ValueError>
Expand description

Reads raw as a value of kind, and checks it with check_value.

For a choice, raw is read as an option name first, then as an option index.

ยงErrors

Returns ValueError when raw cannot be parsed as the kind, or check_value rejects it.