Skip to main content

from_numeric_text

Function from_numeric_text 

Source
pub fn from_numeric_text(raw: &str) -> Result<u64, NumericError>
Expand description

Parse a numeric(20,0)::text result back into a counter.

Strict on purpose. A scale-0 column renders without a fractional part, so anything else — 4.0, +4, 4, 4e2, NaN — means the value did not come from where this function assumes, and guessing at it would be how a silently wrong sequence enters the log.