We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0869fb0 + 84e8073 commit 06f4156Copy full SHA for 06f4156
api-backend/hartex-backend-models/src/lib.rs
@@ -34,13 +34,13 @@ use serde::Deserialize;
34
///
35
/// This is the object returned by a certain API endpoint.
36
#[derive(Deserialize)]
37
-pub struct Response<'a, T> {
+pub struct Response<T> {
38
code: u16,
39
- message: &'a str,
+ message: String,
40
data: T,
41
}
42
43
-impl<'a, T> Response<'a, T>
+impl<'a, T> Response<T>
44
where
45
T: Clone + Deserialize<'a>,
46
{
@@ -50,8 +50,8 @@ where
50
51
52
/// The message of the response.
53
- pub fn message(&self) -> &'a str {
54
- self.message
+ pub fn message(&self) -> String {
+ self.message.clone()
55
56
57
/// The data of the response.
0 commit comments