@@ -6,12 +6,18 @@ use std::collections::BTreeMap as Map;
6
6
use crate :: empty;
7
7
use crate :: prim_str:: PrimStr ;
8
8
9
- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
10
9
#[ cfg_attr(
11
- feature = "serde" ,
10
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
11
+ derive( Serialize , Deserialize )
12
+ ) ]
13
+ #[ cfg_attr(
14
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
12
15
serde( deny_unknown_fields, rename_all = "camelCase" )
13
16
) ]
14
- #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
17
+ #[ cfg_attr(
18
+ feature = "lib-simd-json" ,
19
+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
20
+ ) ]
15
21
pub struct CitmCatalog {
16
22
pub area_names : Map < IdStr , String > ,
17
23
pub audience_sub_category_names : Map < IdStr , String > ,
@@ -29,12 +35,18 @@ pub struct CitmCatalog {
29
35
pub type Id = u32 ;
30
36
pub type IdStr = PrimStr < u32 > ;
31
37
32
- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
33
38
#[ cfg_attr(
34
- feature = "serde" ,
39
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
40
+ derive( Serialize , Deserialize )
41
+ ) ]
42
+ #[ cfg_attr(
43
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
35
44
serde( deny_unknown_fields, rename_all = "camelCase" )
36
45
) ]
37
- #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
46
+ #[ cfg_attr(
47
+ feature = "lib-simd-json" ,
48
+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
49
+ ) ]
38
50
pub struct Event {
39
51
pub description : ( ) ,
40
52
pub id : Id ,
@@ -46,12 +58,18 @@ pub struct Event {
46
58
pub topic_ids : Vec < Id > ,
47
59
}
48
60
49
- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
50
61
#[ cfg_attr(
51
- feature = "serde" ,
62
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
63
+ derive( Serialize , Deserialize )
64
+ ) ]
65
+ #[ cfg_attr(
66
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
52
67
serde( deny_unknown_fields, rename_all = "camelCase" )
53
68
) ]
54
- #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
69
+ #[ cfg_attr(
70
+ feature = "lib-simd-json" ,
71
+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
72
+ ) ]
55
73
pub struct Performance {
56
74
pub event_id : Id ,
57
75
pub id : Id ,
@@ -64,35 +82,53 @@ pub struct Performance {
64
82
pub venue_code : String ,
65
83
}
66
84
67
- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
68
85
#[ cfg_attr(
69
- feature = "serde" ,
86
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
87
+ derive( Serialize , Deserialize )
88
+ ) ]
89
+ #[ cfg_attr(
90
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
70
91
serde( deny_unknown_fields, rename_all = "camelCase" )
71
92
) ]
72
- #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
93
+ #[ cfg_attr(
94
+ feature = "lib-simd-json" ,
95
+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
96
+ ) ]
73
97
pub struct Price {
74
98
pub amount : u32 ,
75
99
pub audience_sub_category_id : Id ,
76
100
pub seat_category_id : Id ,
77
101
}
78
102
79
- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
80
103
#[ cfg_attr(
81
- feature = "serde" ,
104
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
105
+ derive( Serialize , Deserialize )
106
+ ) ]
107
+ #[ cfg_attr(
108
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
82
109
serde( deny_unknown_fields, rename_all = "camelCase" )
83
110
) ]
84
- #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
111
+ #[ cfg_attr(
112
+ feature = "lib-simd-json" ,
113
+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
114
+ ) ]
85
115
pub struct SeatCategory {
86
116
pub areas : Vec < Area > ,
87
117
pub seat_category_id : Id ,
88
118
}
89
119
90
- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
91
120
#[ cfg_attr(
92
- feature = "serde" ,
121
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
122
+ derive( Serialize , Deserialize )
123
+ ) ]
124
+ #[ cfg_attr(
125
+ any( feature = "serde" , feature = "lib-simd-json" ) ,
93
126
serde( deny_unknown_fields, rename_all = "camelCase" )
94
127
) ]
95
- #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
128
+ #[ cfg_attr(
129
+ feature = "lib-simd-json" ,
130
+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
131
+ ) ]
96
132
pub struct Area {
97
133
pub area_id : Id ,
98
134
pub block_ids : empty:: Array ,
0 commit comments