1
1
use std:: fmt:: { Debug , Display } ;
2
2
3
3
use serde:: { Deserialize , Serialize , Serializer } ;
4
- use valuable:: Valuable ;
5
4
6
- #[ derive( Serialize , Valuable , Debug , Clone , Copy ) ]
5
+ #[ derive( Serialize , Debug , Clone , Copy ) ]
7
6
pub struct ServicesResponse {
8
7
#[ serde( rename( serialize = "Xbox services" ) ) ]
9
8
pub xbox : Status ,
@@ -15,28 +14,28 @@ pub struct ServicesResponse {
15
14
pub minecraft_api : Status ,
16
15
}
17
16
18
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
17
+ #[ derive( Deserialize , Clone , Debug ) ]
19
18
#[ serde( rename_all = "PascalCase" ) ]
20
19
pub struct XblStatusResponse {
21
20
pub status : XblStatusStatus ,
22
21
pub core_services : Vec < XblStatusCoreService > ,
23
22
pub titles : Vec < XblStatusCoreService > ,
24
23
}
25
24
26
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
25
+ #[ derive( Deserialize , Clone , Debug ) ]
27
26
#[ serde( rename_all = "PascalCase" ) ]
28
27
pub struct XblStatusStatus {
29
28
pub overall : XblStatusStatusItem ,
30
29
}
31
30
32
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
31
+ #[ derive( Deserialize , Clone , Debug ) ]
33
32
#[ serde( rename_all = "PascalCase" ) ]
34
33
pub struct XblStatusStatusItem {
35
34
pub state : String ,
36
35
}
37
36
38
37
#[ allow( clippy:: module_name_repetitions) ]
39
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
38
+ #[ derive( Deserialize , Clone , Debug ) ]
40
39
pub struct XblStatusCoreService {
41
40
#[ serde( rename( deserialize = "Id" ) ) ]
42
41
pub id : i64 ,
@@ -46,37 +45,37 @@ pub struct XblStatusCoreService {
46
45
pub possible_scenarios : Vec < XblStatusCoreServiceScenario > ,
47
46
}
48
47
49
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
48
+ #[ derive( Deserialize , Clone , Debug ) ]
50
49
#[ serde( rename_all = "PascalCase" ) ]
51
50
pub struct XblStatusCoreServiceScenario {
52
51
pub id : i64 ,
53
52
}
54
53
55
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
54
+ #[ derive( Deserialize , Clone , Debug ) ]
56
55
#[ serde( rename_all = "PascalCase" ) ]
57
56
pub struct XblStatusCoreServiceStatus {
58
57
pub id : i64 ,
59
58
}
60
59
61
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
60
+ #[ derive( Deserialize , Clone , Debug ) ]
62
61
pub struct MojangSessionServerStatus {
63
62
pub id : String ,
64
63
pub name : String ,
65
64
}
66
65
67
- #[ derive( Deserialize , Valuable , Clone , Debug ) ]
66
+ #[ derive( Deserialize , Clone , Debug ) ]
68
67
pub struct MojangApiStatus {
69
68
pub id : String ,
70
69
pub name : String ,
71
70
}
72
71
73
- #[ derive( Deserialize , Valuable , Clone , Debug , Eq , PartialEq ) ]
72
+ #[ derive( Deserialize , Clone , Debug , Eq , PartialEq ) ]
74
73
pub struct MinecraftApiStatusEntry {
75
74
pub id : String ,
76
75
pub name : String ,
77
76
}
78
77
79
- #[ derive( Serialize , Deserialize , Valuable , Debug , Clone ) ]
78
+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
80
79
pub struct MCPingResponse {
81
80
pub latency : u64 ,
82
81
pub players : Players ,
@@ -87,32 +86,32 @@ pub struct MCPingResponse {
87
86
pub chat : ChatStatus ,
88
87
}
89
88
90
- #[ derive( Serialize , Deserialize , Valuable , Debug , Clone , Copy , Default ) ]
89
+ #[ derive( Serialize , Deserialize , Debug , Clone , Copy , Default ) ]
91
90
pub struct ChatStatus {
92
91
pub preview : bool ,
93
92
pub signing : bool ,
94
93
}
95
94
96
- #[ derive( Serialize , Deserialize , Valuable , Debug , Clone ) ]
95
+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
97
96
pub struct Version {
98
97
pub protocol : i64 ,
99
98
pub broadcast : String ,
100
99
}
101
100
102
- #[ derive( Serialize , Deserialize , Valuable , Debug , Clone ) ]
101
+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
103
102
pub struct Players {
104
103
pub online : i64 ,
105
104
pub maximum : i64 ,
106
105
pub sample : Vec < PlayerSample > ,
107
106
}
108
107
109
- #[ derive( Serialize , Deserialize , Valuable , Debug , Clone ) ]
108
+ #[ derive( Serialize , Deserialize , Debug , Clone ) ]
110
109
pub struct PlayerSample {
111
110
pub uuid : String ,
112
111
pub name : String ,
113
112
}
114
113
115
- #[ derive( Clone , Copy , Debug , Valuable ) ]
114
+ #[ derive( Clone , Copy , Debug ) ]
116
115
pub enum Status {
117
116
Operational ,
118
117
PossibleProblems ,
0 commit comments