MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse_uint32

Function parse_uint32

src/repr/src/strconv.rs:190–194  ·  view source on GitHub ↗

Parses an [`u32`] from `s`. Valid values are whatever the [`std::str::FromStr`] implementation on `u32` accepts, plus leading and trailing whitespace.

(s: &str)

Source from the content-addressed store, hash-verified

188/// Valid values are whatever the [`std::str::FromStr`] implementation on `u32` accepts,
189/// plus leading and trailing whitespace.
190pub 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`.
197pub fn format_uint32<F>(buf: &mut F, u: u32) -> Nestable

Callers 4

cast_string_to_uint32Function · 0.85
decode_textMethod · 0.85
decode_text_into_rowMethod · 0.85
evalMethod · 0.85

Calls 3

with_detailsMethod · 0.80
parseMethod · 0.45
trimMethod · 0.45

Tested by

no test coverage detected