pub struct NumFold {
pub int_sum: i64,
pub float_sum: f64,
pub is_float: bool,
pub count: usize,
pub min_i: i64,
pub max_i: i64,
pub min_f: f64,
pub max_f: f64,
pub any: bool,
}Expand description
Fold numeric values over spans into (int_sum, float_sum, is_float, n).
Integer spans accumulate into int_sum; a single float promotes the
whole fold to float_sum (which tracks the running total as f64).
Spans that don’t parse as numbers are skipped.
Fields§
§int_sum: i64§float_sum: f64§is_float: bool§count: usize§min_i: i64§max_i: i64§min_f: f64§max_f: f64§any: boolTrait Implementations§
impl Copy for NumFold
Auto Trait Implementations§
impl Freeze for NumFold
impl RefUnwindSafe for NumFold
impl Send for NumFold
impl Sync for NumFold
impl Unpin for NumFold
impl UnsafeUnpin for NumFold
impl UnwindSafe for NumFold
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more