Skip to main content

required_str

Function required_str 

Source
pub fn required_str<'a>(args: &'a Value, name: &str) -> Result<&'a str, String>
Expand description

Extract a required string argument, reporting absence and wrong type distinctly.

§Errors

Returns the client-facing message when the value is missing or not a string.