pub struct Aggregate { /* private fields */ }Expand description
A summary computed over one column of a group of rows.
Implementations§
Source§impl Aggregate
impl Aggregate
Sourcepub fn count(column: usize) -> Self
pub fn count(column: usize) -> Self
The number of non-empty cells. Shown as a plain integer, not through the column’s formatter.
Sourcepub fn sum(column: usize) -> Self
pub fn sum(column: usize) -> Self
The sum of the numeric cells: an Int when every one is an integer
(and the sum fits), else a Float; Null when there are none.
Sourcepub fn mean(column: usize) -> Self
pub fn mean(column: usize) -> Self
The mean of the numeric cells as a Float; Null when there are none.
Sourcepub fn custom(
column: usize,
f: impl Fn(&[&Value]) -> Value + Send + Sync + 'static,
) -> Self
pub fn custom( column: usize, f: impl Fn(&[&Value]) -> Value + Send + Sync + 'static, ) -> Self
Any summary: f receives the group’s cells of column, in row order.
Sourcepub fn is_count(&self) -> bool
pub fn is_count(&self) -> bool
Whether this is a count, which is displayed
without the column’s formatter.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Aggregate
impl !UnwindSafe for Aggregate
impl Freeze for Aggregate
impl Send for Aggregate
impl Sync for Aggregate
impl Unpin for Aggregate
impl UnsafeUnpin for Aggregate
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