Parses an [`u32`] from `s`. Valid values are whatever the [`std::str::FromStr`] implementation on `u32` accepts, plus leading and trailing whitespace.
(s: &str)
| 188 | /// Valid values are whatever the [`std::str::FromStr`] implementation on `u32` accepts, |
| 189 | /// plus leading and trailing whitespace. |
| 190 | pub fn parse_uint32(s: &str) -> Result<u32, ParseError> { |
| 191 | s.trim() |
| 192 | .parse() |
| 193 | .map_err(|e| ParseError::invalid_input_syntax("uint4", s).with_details(e)) |
| 194 | } |
| 195 | |
| 196 | /// Writes an `u32` to `buf`. |
| 197 | pub fn format_uint32<F>(buf: &mut F, u: u32) -> Nestable |
no test coverage detected