Struct clipivot::aggregation::Aggregator
source · pub struct Aggregator<T, I, O>where
T: Accumulate<I, O>,
I: FromStr,
O: Display,{ /* private fields */ }
Expand description
The object that computes the aggregations and writes to standard output.
Implementations§
source§impl<T, I, O> Aggregator<T, I, O>where
T: Accumulate<I, O>,
I: FromStr,
O: Display,
impl<T, I, O> Aggregator<T, I, O>where T: Accumulate<I, O>, I: FromStr, O: Display,
pub fn new( index_cols: Vec<usize>, column_cols: Vec<usize>, values_col: usize, skip_null: bool, row_order: OutputOrder, column_order: OutputOrder, parsing_strategy: ParsingStrategy ) -> Aggregator<T, I, O>
sourcepub fn aggregate<R: Read>(&mut self, rdr: &mut Reader<R>) -> CsvCliResult<()>
pub fn aggregate<R: Read>(&mut self, rdr: &mut Reader<R>) -> CsvCliResult<()>
Takes a CSV (from anything that impl’s Read) and aggregates information from the struct’s settings. Does not write anything.
sourcepub fn to_vec(&self) -> Vec<Vec<String>> ⓘ
pub fn to_vec(&self) -> Vec<Vec<String>> ⓘ
Writes the aggregated information into a list of records
sourcepub fn write_results<W: Write>(
&mut self,
writer: &mut Writer<W>
) -> CsvCliResult<()>
pub fn write_results<W: Write>( &mut self, writer: &mut Writer<W> ) -> CsvCliResult<()>
Writes the aggregated information to standard output.
Trait Implementations§
source§impl<T, I, O> Debug for Aggregator<T, I, O>where
T: Accumulate<I, O> + Debug,
I: FromStr + Debug,
O: Display + Debug,
impl<T, I, O> Debug for Aggregator<T, I, O>where T: Accumulate<I, O> + Debug, I: FromStr + Debug, O: Display + Debug,
source§impl<T, I, O> PartialEq<Aggregator<T, I, O>> for Aggregator<T, I, O>where
T: Accumulate<I, O> + PartialEq,
I: FromStr + PartialEq,
O: Display + PartialEq,
impl<T, I, O> PartialEq<Aggregator<T, I, O>> for Aggregator<T, I, O>where T: Accumulate<I, O> + PartialEq, I: FromStr + PartialEq, O: Display + PartialEq,
source§fn eq(&self, other: &Aggregator<T, I, O>) -> bool
fn eq(&self, other: &Aggregator<T, I, O>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.