Skip to main content

parse_bool

Function parse_bool 

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

Boolean parser per Spec §7.1.4 Tab.7.1.

Accepted values (all case-sensitive in the spec, we additionally accept the common uppercase spelling — Cyclone and FastDDS are tolerant here too):

  • true, TRUE, 1 -> true
  • false, FALSE, 0 -> false

§Errors

XmlError::ValueOutOfRange for any other string.