Skip to main content

try_parse_bool

Function try_parse_bool 

Source
pub fn try_parse_bool(s: &str) -> Result<bool, String>
Expand description

Flexible bool coercion used when the user/developer explicitly requests a conversion to boolean (e.g. in table column formatting).

  • Numbers are language-independent and extremely useful.
  • Common English/config words are accepted case-insensitively.
  • Everything else fails with a clear error (no silent false).