From 6c9fb80ced3489cd18fc6e6586c213ad4ac2848e Mon Sep 17 00:00:00 2001 From: LukaOber Date: Mon, 11 Nov 2024 09:53:42 +0100 Subject: [PATCH] implement copy for all available enums --- charming/src/component/data_zoom.rs | 4 ++-- charming/src/component/legend.rs | 4 ++-- charming/src/component/single_axis.rs | 2 +- charming/src/component/toolbox.rs | 6 +++--- charming/src/component/visual_map.rs | 2 +- charming/src/datatype/dimension.rs | 2 +- charming/src/datatype/value.rs | 2 +- charming/src/element/area_style.rs | 2 +- charming/src/element/axis_pointer.rs | 4 ++-- charming/src/element/axis_type.rs | 2 +- charming/src/element/border_type.rs | 2 +- charming/src/element/color.rs | 2 +- charming/src/element/coordinate.rs | 2 +- charming/src/element/cursor.rs | 2 +- charming/src/element/emphasis.rs | 2 +- charming/src/element/font_settings.rs | 2 +- charming/src/element/label.rs | 6 +++--- charming/src/element/line_style.rs | 2 +- charming/src/element/link_target.rs | 2 +- charming/src/element/mark_line.rs | 2 +- charming/src/element/mark_point.rs | 2 +- charming/src/element/name_location.rs | 2 +- charming/src/element/orient.rs | 2 +- charming/src/element/parallel_layout.rs | 2 +- charming/src/element/shape.rs | 2 +- charming/src/element/smoothness.rs | 2 +- charming/src/element/sort.rs | 2 +- charming/src/element/text_align.rs | 4 ++-- charming/src/element/tooltip.rs | 4 ++-- charming/src/series/effect_scatter.rs | 6 +++--- charming/src/series/funnel.rs | 2 +- charming/src/series/graph.rs | 2 +- charming/src/series/parallel.rs | 2 +- charming/src/series/pie.rs | 2 +- charming/src/series/sankey.rs | 2 +- charming/src/series/tree.rs | 6 +++--- 36 files changed, 49 insertions(+), 49 deletions(-) diff --git a/charming/src/component/data_zoom.rs b/charming/src/component/data_zoom.rs index 0041b29..6847633 100644 --- a/charming/src/component/data_zoom.rs +++ b/charming/src/component/data_zoom.rs @@ -5,7 +5,7 @@ use crate::{ element::{Color, DataBackground, Orient, TextStyle}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "camelCase")] pub enum FilterMode { Filter, @@ -14,7 +14,7 @@ pub enum FilterMode { None, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum DataZoomType { Inside, diff --git a/charming/src/component/legend.rs b/charming/src/component/legend.rs index 29fea58..7959aa8 100644 --- a/charming/src/component/legend.rs +++ b/charming/src/component/legend.rs @@ -7,7 +7,7 @@ use crate::{ element::{Color, Icon, ItemStyle, LabelAlign, LineStyle, Orient, Padding, TextStyle}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum LegendType { /// Simple legend. @@ -17,7 +17,7 @@ pub enum LegendType { Scroll, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum LegendSelectedMode { /// Multiple selection. diff --git a/charming/src/component/single_axis.rs b/charming/src/component/single_axis.rs index 2b10183..bf4b2df 100644 --- a/charming/src/component/single_axis.rs +++ b/charming/src/component/single_axis.rs @@ -2,7 +2,7 @@ use serde::Serialize; use crate::{datatype::CompositeValue, element::Orient}; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum Type { Value, diff --git a/charming/src/component/toolbox.rs b/charming/src/component/toolbox.rs index 4455dc0..47c3cf5 100644 --- a/charming/src/component/toolbox.rs +++ b/charming/src/component/toolbox.rs @@ -2,7 +2,7 @@ use serde::Serialize; use crate::{datatype::CompositeValue, element::Orient}; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum SaveAsImageType { Png, @@ -143,7 +143,7 @@ impl DataView { } } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum MagicTypeType { /// For line charts. @@ -200,7 +200,7 @@ impl MagicType { } } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "camelCase")] pub enum BrushType { Rect, diff --git a/charming/src/component/visual_map.rs b/charming/src/component/visual_map.rs index f0ef4f1..536660c 100644 --- a/charming/src/component/visual_map.rs +++ b/charming/src/component/visual_map.rs @@ -5,7 +5,7 @@ use crate::{ element::{Color, Orient, TextStyle}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum VisualMapType { Continuous, diff --git a/charming/src/datatype/dimension.rs b/charming/src/datatype/dimension.rs index 7050cb8..6619d5f 100644 --- a/charming/src/datatype/dimension.rs +++ b/charming/src/datatype/dimension.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(untagged)] pub enum DimensionType { Number, diff --git a/charming/src/datatype/value.rs b/charming/src/datatype/value.rs index 1e690f8..0402caf 100644 --- a/charming/src/datatype/value.rs +++ b/charming/src/datatype/value.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -#[derive(Debug, Clone, PartialEq, PartialOrd, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Serialize, Deserialize)] #[serde(untagged)] pub enum NumericValue { Integer(i64), diff --git a/charming/src/element/area_style.rs b/charming/src/element/area_style.rs index fba5691..2d74fa9 100644 --- a/charming/src/element/area_style.rs +++ b/charming/src/element/area_style.rs @@ -2,7 +2,7 @@ use serde::Serialize; use super::color::Color; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum OriginPosition { Auto, diff --git a/charming/src/element/axis_pointer.rs b/charming/src/element/axis_pointer.rs index 32a4861..8f35e5a 100644 --- a/charming/src/element/axis_pointer.rs +++ b/charming/src/element/axis_pointer.rs @@ -5,7 +5,7 @@ use crate::{ element::{Label, LineStyle}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum AxisPointerType { Line, @@ -14,7 +14,7 @@ pub enum AxisPointerType { None, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum AxisPointerAxis { X, diff --git a/charming/src/element/axis_type.rs b/charming/src/element/axis_type.rs index 7fdbeb7..c7563b0 100644 --- a/charming/src/element/axis_type.rs +++ b/charming/src/element/axis_type.rs @@ -1,7 +1,7 @@ use serde::Serialize; /// Type of axis. -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum AxisType { /// Numerical axis, suitable for continuous data. diff --git a/charming/src/element/border_type.rs b/charming/src/element/border_type.rs index 8a6290f..12f50af 100644 --- a/charming/src/element/border_type.rs +++ b/charming/src/element/border_type.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -#[derive(Serialize, Deserialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Deserialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum BorderType { Solid, diff --git a/charming/src/element/color.rs b/charming/src/element/color.rs index 402e83d..4de8722 100644 --- a/charming/src/element/color.rs +++ b/charming/src/element/color.rs @@ -1,7 +1,7 @@ use serde::ser::{SerializeStruct, Serializer}; use serde::{Deserialize, Serialize}; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum ColorBy { Series, diff --git a/charming/src/element/coordinate.rs b/charming/src/element/coordinate.rs index ab54301..02ed105 100644 --- a/charming/src/element/coordinate.rs +++ b/charming/src/element/coordinate.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum CoordinateSystem { Cartesian2d, diff --git a/charming/src/element/cursor.rs b/charming/src/element/cursor.rs index bd48b8c..8608b71 100644 --- a/charming/src/element/cursor.rs +++ b/charming/src/element/cursor.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum Cursor { Pointer, diff --git a/charming/src/element/emphasis.rs b/charming/src/element/emphasis.rs index da6ee98..67f0927 100644 --- a/charming/src/element/emphasis.rs +++ b/charming/src/element/emphasis.rs @@ -2,7 +2,7 @@ use serde::Serialize; use super::{item_style::ItemStyle, AreaStyle, Label}; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum EmphasisFocus { None, diff --git a/charming/src/element/font_settings.rs b/charming/src/element/font_settings.rs index 6deb55f..3328bb7 100644 --- a/charming/src/element/font_settings.rs +++ b/charming/src/element/font_settings.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "camelCase")] pub enum FontStyle { Normal, diff --git a/charming/src/element/label.rs b/charming/src/element/label.rs index a847ee7..02c747f 100644 --- a/charming/src/element/label.rs +++ b/charming/src/element/label.rs @@ -7,7 +7,7 @@ use super::{ Formatter, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "camelCase")] pub enum LabelPosition { Top, @@ -29,7 +29,7 @@ pub enum LabelPosition { Center, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum LabelAlign { Left, @@ -37,7 +37,7 @@ pub enum LabelAlign { Right, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum LabelVerticalAlign { Top, diff --git a/charming/src/element/line_style.rs b/charming/src/element/line_style.rs index 55df743..69312e7 100644 --- a/charming/src/element/line_style.rs +++ b/charming/src/element/line_style.rs @@ -2,7 +2,7 @@ use serde::Serialize; use super::color::Color; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum LineStyleType { Solid, diff --git a/charming/src/element/link_target.rs b/charming/src/element/link_target.rs index c67bce7..948b878 100644 --- a/charming/src/element/link_target.rs +++ b/charming/src/element/link_target.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum LinkTarget { #[serde(rename = "self")] diff --git a/charming/src/element/mark_line.rs b/charming/src/element/mark_line.rs index 8fe5729..ba2b47e 100644 --- a/charming/src/element/mark_line.rs +++ b/charming/src/element/mark_line.rs @@ -4,7 +4,7 @@ use crate::datatype::CompositeValue; use super::{label::Label, line_style::LineStyle, symbol::Symbol}; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum MarkLineDataType { Min, diff --git a/charming/src/element/mark_point.rs b/charming/src/element/mark_point.rs index 4c296c7..1a56aab 100644 --- a/charming/src/element/mark_point.rs +++ b/charming/src/element/mark_point.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum MarkPointDataType { Min, diff --git a/charming/src/element/name_location.rs b/charming/src/element/name_location.rs index 3baf270..92f9bc0 100644 --- a/charming/src/element/name_location.rs +++ b/charming/src/element/name_location.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum NameLocation { Start, diff --git a/charming/src/element/orient.rs b/charming/src/element/orient.rs index 6867ec5..3581556 100644 --- a/charming/src/element/orient.rs +++ b/charming/src/element/orient.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum Orient { Horizontal, diff --git a/charming/src/element/parallel_layout.rs b/charming/src/element/parallel_layout.rs index e7aad97..4e5ae43 100644 --- a/charming/src/element/parallel_layout.rs +++ b/charming/src/element/parallel_layout.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum ParallelLayout { Horizontal, diff --git a/charming/src/element/shape.rs b/charming/src/element/shape.rs index f86d24f..9c8f21f 100644 --- a/charming/src/element/shape.rs +++ b/charming/src/element/shape.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum Shape { Polygon, diff --git a/charming/src/element/smoothness.rs b/charming/src/element/smoothness.rs index 7a8aae5..fad5eba 100644 --- a/charming/src/element/smoothness.rs +++ b/charming/src/element/smoothness.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Debug, PartialEq, PartialOrd, Clone)] +#[derive(Debug, PartialEq, PartialOrd, Clone, Copy)] pub enum Smoothness { Single(f64), Boolean(bool), diff --git a/charming/src/element/sort.rs b/charming/src/element/sort.rs index 6f2589d..44321f5 100644 --- a/charming/src/element/sort.rs +++ b/charming/src/element/sort.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Debug, PartialEq, PartialOrd, Clone)] +#[derive(Debug, PartialEq, PartialOrd, Clone, Copy)] pub enum Sort { Ascending, Descending, diff --git a/charming/src/element/text_align.rs b/charming/src/element/text_align.rs index e628b61..ea5caf7 100644 --- a/charming/src/element/text_align.rs +++ b/charming/src/element/text_align.rs @@ -1,6 +1,6 @@ use serde::Serialize; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum TextAlign { Auto, @@ -9,7 +9,7 @@ pub enum TextAlign { Center, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum TextVerticalAlign { Auto, diff --git a/charming/src/element/tooltip.rs b/charming/src/element/tooltip.rs index df9817e..cea8b9e 100644 --- a/charming/src/element/tooltip.rs +++ b/charming/src/element/tooltip.rs @@ -2,7 +2,7 @@ use serde::Serialize; use crate::element::{AxisPointer, Color, Formatter, Padding}; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum TriggerOn { Mousemove, @@ -13,7 +13,7 @@ pub enum TriggerOn { } /// Types of triggering. -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum Trigger { Item, diff --git a/charming/src/series/effect_scatter.rs b/charming/src/series/effect_scatter.rs index 04de8e4..7754526 100644 --- a/charming/src/series/effect_scatter.rs +++ b/charming/src/series/effect_scatter.rs @@ -8,20 +8,20 @@ use crate::{ }, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum EffectType { Ripple, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum ShowEffectOn { Render, Emphasis, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum RippleEffectBrushType { Fill, diff --git a/charming/src/series/funnel.rs b/charming/src/series/funnel.rs index 7fcd8bb..3148a45 100644 --- a/charming/src/series/funnel.rs +++ b/charming/src/series/funnel.rs @@ -5,7 +5,7 @@ use crate::{ element::{ColorBy, Emphasis, ItemStyle, Label, LabelLine, Orient, Sort, Tooltip}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum Align { Left, diff --git a/charming/src/series/graph.rs b/charming/src/series/graph.rs index 0212d39..c29b396 100644 --- a/charming/src/series/graph.rs +++ b/charming/src/series/graph.rs @@ -88,7 +88,7 @@ impl GraphLayoutForce { } } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum GraphLayout { None, diff --git a/charming/src/series/parallel.rs b/charming/src/series/parallel.rs index 8dc9377..f646e73 100644 --- a/charming/src/series/parallel.rs +++ b/charming/src/series/parallel.rs @@ -5,7 +5,7 @@ use crate::{ element::{smoothness::Smoothness, ColorBy, CoordinateSystem, Emphasis, LineStyle}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum ProgressiveChunkMode { Sequential, diff --git a/charming/src/series/pie.rs b/charming/src/series/pie.rs index cbaf088..06c84ad 100644 --- a/charming/src/series/pie.rs +++ b/charming/src/series/pie.rs @@ -5,7 +5,7 @@ use crate::{ element::{ColorBy, CoordinateSystem, Emphasis, ItemStyle, Label, LabelLine, Tooltip}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum PieRoseType { Radius, diff --git a/charming/src/series/sankey.rs b/charming/src/series/sankey.rs index 84c88e1..9149269 100644 --- a/charming/src/series/sankey.rs +++ b/charming/src/series/sankey.rs @@ -5,7 +5,7 @@ use crate::{ element::{Emphasis, ItemStyle, Label, LineStyle, Orient, Tooltip}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum SankeyNodeAlign { Left, diff --git a/charming/src/series/tree.rs b/charming/src/series/tree.rs index 0409376..3d0b4fe 100644 --- a/charming/src/series/tree.rs +++ b/charming/src/series/tree.rs @@ -5,14 +5,14 @@ use crate::{ element::{Blur, Emphasis, ItemStyle, Label, Select, Symbol, Tooltip}, }; -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum TreeLayout { Orthogonal, Radial, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] pub enum TreeOrient { #[serde(rename = "LR")] LeftRight, @@ -24,7 +24,7 @@ pub enum TreeOrient { BottomTop, } -#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)] +#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone, Copy)] #[serde(rename_all = "snake_case")] pub enum TreeEdgeShape { Curve,