nautilus_core::correctness

Function check_valid_string_optional

source
pub fn check_valid_string_optional(s: Option<&str>, param: &str) -> Result<()>
Expand description

Checks the string s if Some, contains only ASCII characters and has semantic meaning.

ยงErrors

This function returns an error:

  • If s is an empty string.
  • If s consists solely of whitespace characters.
  • If s contains one or more non-ASCII characters.