pub struct PivotResult {
pub row_nodes: Vec<PivotNode>,
pub col_nodes: Vec<PivotNode>,
pub row_roots: Vec<usize>,
pub col_roots: Vec<usize>,
pub values: HashMap<(usize, usize), CellValue>,
pub grand_total: CellValue,
pub row_depth: usize,
pub col_depth: usize,
pub row_field_names: Vec<String>,
pub col_field_names: Vec<String>,
pub value_caption: String,
pub source_row_count: usize,
}Expand description
The complete computed pivot. Cheap to share behind an Arc; the paint
path never touches the source rows again.
Fields§
§row_nodes: Vec<PivotNode>Arena of row-axis nodes; tree edges via parent/children.
col_nodes: Vec<PivotNode>Arena of column-axis nodes.
row_roots: Vec<usize>Row-axis roots (depth 0), in canonical ascending order.
col_roots: Vec<usize>Column-axis roots (depth 0), in canonical ascending order.
values: HashMap<(usize, usize), CellValue>Aggregated value for every (row key, col key) pair where a key is a
node id or TOTAL_KEY. Contains every rollup level, so collapsed
groups and subtotal rows/columns read straight from this map.
grand_total: CellValueThe value across all rows and columns.
row_depth: usizeNumber of row fields (row tree depth).
col_depth: usizeNumber of column fields (column tree depth).
row_field_names: Vec<String>Display names of the row fields, outermost first.
col_field_names: Vec<String>Display names of the column fields, outermost first.
value_caption: StringHeader caption for the value area, e.g. "Sum of Amount".
source_row_count: usizeHow many source rows were included (after source filters).
Implementations§
Source§impl PivotResult
impl PivotResult
Sourcepub fn value(&self, row_key: usize, col_key: usize) -> &CellValue
pub fn value(&self, row_key: usize, col_key: usize) -> &CellValue
Aggregated value for (row_key, col_key) where either key may be
TOTAL_KEY. Missing intersections (no source rows) are None.
Sourcepub fn row_leaves(&self) -> Vec<usize>
pub fn row_leaves(&self) -> Vec<usize>
Ids of row-axis leaves in canonical depth-first order.
Sourcepub fn col_leaves(&self) -> Vec<usize>
pub fn col_leaves(&self) -> Vec<usize>
Ids of column-axis leaves in canonical depth-first order.
Trait Implementations§
Source§impl Clone for PivotResult
impl Clone for PivotResult
Source§fn clone(&self) -> PivotResult
fn clone(&self) -> PivotResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PivotResult
impl Debug for PivotResult
Source§impl Default for PivotResult
impl Default for PivotResult
Source§fn default() -> PivotResult
fn default() -> PivotResult
Auto Trait Implementations§
impl Freeze for PivotResult
impl RefUnwindSafe for PivotResult
impl Send for PivotResult
impl Sync for PivotResult
impl Unpin for PivotResult
impl UnsafeUnpin for PivotResult
impl UnwindSafe for PivotResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().