diff --git a/build/header_generator.rs b/build/header_generator.rs index 7467c88..4a27fee 100644 --- a/build/header_generator.rs +++ b/build/header_generator.rs @@ -60,6 +60,7 @@ use self::uuid::Uuid; fn generate_struct(fun: &mut String, element: &Element) { let mut seen_fields = HashSet::new(); fun.push_str("/// Contains common properties for the DXF file.\n"); + fun.push_str("#[derive(Debug, Clone)]\n"); fun.push_str( "#[cfg_attr(feature = \"serialize\", derive(serde::Serialize, serde::Deserialize))]\n", ); diff --git a/build/table_generator.rs b/build/table_generator.rs index 9673b51..05ca586 100644 --- a/build/table_generator.rs +++ b/build/table_generator.rs @@ -56,7 +56,7 @@ fn generate_table_items(fun: &mut String, element: &Element) { for table in &element.children { let mut seen_fields = HashSet::new(); let table_item = &table.children[0]; - fun.push_str("#[derive(Debug)]\n"); + fun.push_str("#[derive(Debug, Clone)]\n"); fun.push_str( "#[cfg_attr(feature = \"serialize\", derive(serde::Serialize, serde::Deserialize))]\n", ); diff --git a/src/class.rs b/src/class.rs index a16ff50..c928b52 100644 --- a/src/class.rs +++ b/src/class.rs @@ -5,7 +5,7 @@ use crate::enums::*; use crate::helper_functions::*; /// Represents an application-defined class whose instances are `Block`s, `Entity`s, and `Object`s. -#[derive(Clone)] +#[derive(Debug, Clone)] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] pub struct Class { /// Class DXF record name. diff --git a/src/drawing.rs b/src/drawing.rs index 4f1d5fb..3c582e2 100644 --- a/src/drawing.rs +++ b/src/drawing.rs @@ -39,6 +39,7 @@ use std::path::Path; pub(crate) const AUTO_REPLACE_HANDLE: Handle = Handle(0xFFFF_FFFF_FFFF_FFFF); /// Represents a DXF drawing. +#[derive(Debug, Clone)] #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))] pub struct Drawing { /// The drawing's header. Contains various drawing-specific values and settings.