1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
pub mod oauth;
pub mod public;
pub mod user;
pub mod otp;
pub mod friends;
pub mod transactions;
pub use oauth::*;
pub use public::*;
pub use user::*;
pub use otp::*;
pub use friends::*;
pub use transactions::*;
use DTO;
#[derive(Debug, Clone, RustcDecodable, RustcEncodable)]
pub struct ResponseDTO {
pub message: String,
}
impl ResponseDTO {
pub fn new<S: AsRef<str>>(message: S) -> ResponseDTO {
ResponseDTO { message: String::from(message.as_ref()) }
}
pub fn set_message<S: AsRef<str>>(&mut self, message: S) {
self.message = String::from(message.as_ref());
}
}
impl DTO for ResponseDTO {}