pub fn check_valid_string_optional<T: AsRef<str>>(
s: Option<T>,
param: &str,
) -> Result<()>
Expand description
Checks the string s
if Some, contains only ASCII characters and has semantic meaning.
§Errors
Returns an error if:
s
is an empty string.s
consists solely of whitespace characters.s
contains one or more non-ASCII characters.