@@ -11,7 +11,7 @@ pub(crate) const NOTE_TXT: &str = "note";
1111pub ( crate ) const WARNING_TXT : & str = "warning" ;
1212
1313/// Top-level user message
14- #[ derive( Debug ) ]
14+ #[ derive( Clone , Debug ) ]
1515pub struct Message < ' a > {
1616 pub ( crate ) id : Option < & ' a str > , // for "correctness", could be sloppy and be on Title
1717 pub ( crate ) groups : Vec < Group < ' a > > ,
@@ -76,7 +76,7 @@ impl<'a> Message<'a> {
7676}
7777
7878/// An [`Element`] container
79- #[ derive( Debug ) ]
79+ #[ derive( Clone , Debug ) ]
8080pub struct Group < ' a > {
8181 pub ( crate ) elements : Vec < Element < ' a > > ,
8282}
@@ -108,7 +108,7 @@ impl<'a> Group<'a> {
108108}
109109
110110/// A section of content within a [`Group`]
111- #[ derive( Debug ) ]
111+ #[ derive( Clone , Debug ) ]
112112#[ non_exhaustive]
113113pub enum Element < ' a > {
114114 Title ( Title < ' a > ) ,
@@ -149,13 +149,13 @@ impl From<Padding> for Element<'_> {
149149}
150150
151151/// A whitespace [`Element`] in a [`Group`]
152- #[ derive( Debug ) ]
152+ #[ derive( Clone , Debug ) ]
153153pub struct Padding ;
154154
155155/// A text [`Element`] in a [`Group`]
156156///
157157/// See [`Level::title`] to create this.
158- #[ derive( Debug ) ]
158+ #[ derive( Clone , Debug ) ]
159159pub struct Title < ' a > {
160160 pub ( crate ) level : Level < ' a > ,
161161 pub ( crate ) title : & ' a str ,
@@ -170,7 +170,7 @@ impl Title<'_> {
170170}
171171
172172/// A source view [`Element`] in a [`Group`]
173- #[ derive( Debug ) ]
173+ #[ derive( Clone , Debug ) ]
174174pub struct Snippet < ' a , T > {
175175 pub ( crate ) origin : Option < & ' a str > ,
176176 pub ( crate ) line_start : usize ,
0 commit comments