Parses an [`i16`] from `s`. Valid values are whatever the [`std::str::FromStr`] implementation on `i16` accepts, plus leading and trailing whitespace.
(s: &str)
| 115 | /// Valid values are whatever the [`std::str::FromStr`] implementation on `i16` accepts, |
| 116 | /// plus leading and trailing whitespace. |
| 117 | pub fn parse_int16(s: &str) -> Result<i16, ParseError> { |
| 118 | s.trim() |
| 119 | .parse() |
| 120 | .map_err(|e| ParseError::invalid_input_syntax("smallint", s).with_details(e)) |
| 121 | } |
| 122 | |
| 123 | /// Writes an [`i16`] to `buf`. |
| 124 | pub fn format_int16<F>(buf: &mut F, i: i16) -> Nestable |
no test coverage detected