}
}
-trait CategoryTrait {
- fn name(&self) -> &Value;
-}
-
-impl CategoryTrait for Group {
- fn name(&self) -> &Value {
- &self.name
- }
-}
-
-impl CategoryTrait for Leaf {
- fn name(&self) -> &Value {
- &self.name
- }
-}
-
-impl CategoryTrait for Category {
- fn name(&self) -> &Value {
- match self {
- Category::Group(group) => group.name(),
- Category::Leaf(leaf) => leaf.name(),
- }
- }
-}
-
/// Styling for a pivot table.
///
/// The division between this and the style information in [Table] seems fairly