Skip to main content

opt_str

Function opt_str 

Source
pub fn opt_str<'a>(args: &'a Value, name: &str) -> ArgResult<&'a str>
Expand description

Extract a string argument ("type": "string").

Strict: a number is not a path or a name pattern, so {"reference": 42} is an error rather than a silently stringified "42".

§Errors

Returns the client-facing message when the value is present but not a string.