Skip to main content

checked_f64_to_i64

Function checked_f64_to_i64 

Source
fn checked_f64_to_i64(v: f64) -> Option<i64>
Expand description

Converts an f64 to i64, returning None for non-finite or out-of-range values instead of silently saturating (the behaviour of an as cast).

Used by the date/time value arms so that an out-of-range SAS datetime surfaces as ReadStatError::DateOverflow rather than a clamped value.