pub fn boolean(input: &mut &str) -> ModalResult<bool>
Expand description
Parses bool
. true
or false
- The corresponding type kind:
Bool
§Examples
use serde_hkx::xml::de::parser::type_kind::boolean;
use winnow::Parser as _;
assert_eq!(boolean.parse("true"), Ok(true));
assert_eq!(boolean.parse("false"), Ok(false));
assert!(boolean.parse("invalid").is_err());
§Errors
When parse failed.