Derive clone for main types

This commit is contained in:
Joscha 2024-11-27 00:24:05 +01:00
parent 956b077f04
commit 924679e5ac

View file

@ -11,6 +11,7 @@ pub enum ElementKind {
Normal, Normal,
} }
#[derive(Clone)]
pub enum Content { pub enum Content {
Raw(String), Raw(String),
Text(String), Text(String),
@ -54,6 +55,7 @@ impl From<Element> for Content {
} }
} }
#[derive(Clone)]
pub struct Element { pub struct Element {
pub name: String, pub name: String,
pub kind: ElementKind, pub kind: ElementKind,
@ -104,6 +106,7 @@ impl Element {
/// ///
/// A `Document(el)` is basically the same as `[Content::doctype(), el.into()]` /// A `Document(el)` is basically the same as `[Content::doctype(), el.into()]`
/// for the purposes of the [`crate::Render`] trait. /// for the purposes of the [`crate::Render`] trait.
#[derive(Clone)]
pub struct Document(pub Element); pub struct Document(pub Element);
impl From<Element> for Document { impl From<Element> for Document {