pub struct PivotValueField {
pub column: String,
pub aggregation: PivotAggregation,
pub custom_name: Option<String>,
}Expand description
One field placed in the Values area.
Fields§
§column: StringName of the source column to aggregate, matched against the header row.
aggregation: PivotAggregationHow the column’s values are summarized.
custom_name: Option<String>Overrides the default “Sum of Amount” caption. A custom name is used
verbatim and takes no part in value_field_labels’ disambiguation.
Implementations§
Source§impl PivotValueField
impl PivotValueField
Sourcepub fn new(column: impl Into<String>, aggregation: PivotAggregation) -> Self
pub fn new(column: impl Into<String>, aggregation: PivotAggregation) -> Self
A value field on column with the default caption.
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
This field’s caption considered on its own, ignoring any collision
with the pivot’s other value fields. Use value_field_labels to
caption a whole list the way Excel would.
Trait Implementations§
Source§impl Clone for PivotValueField
impl Clone for PivotValueField
Source§fn clone(&self) -> PivotValueField
fn clone(&self) -> PivotValueField
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PivotValueField
impl Debug for PivotValueField
Source§impl<'de> Deserialize<'de> for PivotValueField
impl<'de> Deserialize<'de> for PivotValueField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PivotValueField
impl PartialEq for PivotValueField
Source§impl Serialize for PivotValueField
impl Serialize for PivotValueField
impl StructuralPartialEq for PivotValueField
Auto Trait Implementations§
impl Freeze for PivotValueField
impl RefUnwindSafe for PivotValueField
impl Send for PivotValueField
impl Sync for PivotValueField
impl Unpin for PivotValueField
impl UnsafeUnpin for PivotValueField
impl UnwindSafe for PivotValueField
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