Parses an [`i32`] from `s`. Valid values are whatever the [`std::str::FromStr`] implementation on `i32` accepts, plus leading and trailing whitespace.
(s: &str)
| 134 | /// Valid values are whatever the [`std::str::FromStr`] implementation on `i32` accepts, |
| 135 | /// plus leading and trailing whitespace. |
| 136 | pub fn parse_int32(s: &str) -> Result<i32, ParseError> { |
| 137 | s.trim() |
| 138 | .parse() |
| 139 | .map_err(|e| ParseError::invalid_input_syntax("integer", s).with_details(e)) |
| 140 | } |
| 141 | |
| 142 | /// Writes an [`i32`] to `buf`. |
| 143 | pub fn format_int32<F>(buf: &mut F, i: i32) -> Nestable |
no test coverage detected