@@ -11,7 +11,7 @@ pub(crate) const NOTE_TXT: &str = "note";
11
11
pub ( crate ) const WARNING_TXT : & str = "warning" ;
12
12
13
13
/// Top-level user message
14
- #[ derive( Debug ) ]
14
+ #[ derive( Clone , Debug ) ]
15
15
pub struct Message < ' a > {
16
16
pub ( crate ) id : Option < & ' a str > , // for "correctness", could be sloppy and be on Title
17
17
pub ( crate ) groups : Vec < Group < ' a > > ,
@@ -76,7 +76,7 @@ impl<'a> Message<'a> {
76
76
}
77
77
78
78
/// An [`Element`] container
79
- #[ derive( Debug ) ]
79
+ #[ derive( Clone , Debug ) ]
80
80
pub struct Group < ' a > {
81
81
pub ( crate ) elements : Vec < Element < ' a > > ,
82
82
}
@@ -108,7 +108,7 @@ impl<'a> Group<'a> {
108
108
}
109
109
110
110
/// A section of content within a [`Group`]
111
- #[ derive( Debug ) ]
111
+ #[ derive( Clone , Debug ) ]
112
112
#[ non_exhaustive]
113
113
pub enum Element < ' a > {
114
114
Title ( Title < ' a > ) ,
@@ -149,13 +149,13 @@ impl From<Padding> for Element<'_> {
149
149
}
150
150
151
151
/// A whitespace [`Element`] in a [`Group`]
152
- #[ derive( Debug ) ]
152
+ #[ derive( Clone , Debug ) ]
153
153
pub struct Padding ;
154
154
155
155
/// A text [`Element`] in a [`Group`]
156
156
///
157
157
/// See [`Level::title`] to create this.
158
- #[ derive( Debug ) ]
158
+ #[ derive( Clone , Debug ) ]
159
159
pub struct Title < ' a > {
160
160
pub ( crate ) level : Level < ' a > ,
161
161
pub ( crate ) title : & ' a str ,
@@ -170,7 +170,7 @@ impl Title<'_> {
170
170
}
171
171
172
172
/// A source view [`Element`] in a [`Group`]
173
- #[ derive( Debug ) ]
173
+ #[ derive( Clone , Debug ) ]
174
174
pub struct Snippet < ' a , T > {
175
175
pub ( crate ) origin : Option < & ' a str > ,
176
176
pub ( crate ) line_start : usize ,
0 commit comments