Skip to main content

required_string_array

Function required_string_array 

Source
pub fn required_string_array(
    params: &Value,
    key: &str,
) -> Result<Vec<String>, (i64, String)>
Expand description

STRICT params[key] string-array parse: the key must be present, an array, and every element a string — anything else is ERR_PARAMS. Destructive setters (share lists) MUST use this: a lenient unwrap_or_default() would read a malformed request as “share with NOBODY” and persist [] — an accidental unshare-everyone.