@@ -11,6 +11,7 @@ use crate::prim_str::PrimStr;
1111 feature = "lib-rustc-serialize" ,
1212 derive( RustcEncodable , RustcDecodable )
1313) ]
14+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
1415pub struct Twitter {
1516 pub statuses : Vec < Status > ,
1617 pub search_metadata : SearchMetadata ,
@@ -27,6 +28,7 @@ pub type ShortIdStr = PrimStr<ShortId>;
2728 feature = "lib-rustc-serialize" ,
2829 derive( RustcEncodable , RustcDecodable )
2930) ]
31+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
3032pub struct Status {
3133 pub metadata : Metadata ,
3234 pub created_at : String ,
@@ -61,6 +63,7 @@ pub struct Status {
6163 feature = "lib-rustc-serialize" ,
6264 derive( RustcEncodable , RustcDecodable )
6365) ]
66+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
6467pub struct Metadata {
6568 pub result_type : ResultType ,
6669 pub iso_language_code : LanguageCode ,
@@ -72,6 +75,7 @@ pub struct Metadata {
7275 feature = "lib-rustc-serialize" ,
7376 derive( RustcEncodable , RustcDecodable )
7477) ]
78+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
7579pub struct User {
7680 pub id : ShortId ,
7781 pub id_str : ShortIdStr ,
@@ -121,6 +125,7 @@ pub struct User {
121125 feature = "lib-rustc-serialize" ,
122126 derive( RustcEncodable , RustcDecodable )
123127) ]
128+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
124129pub struct UserEntities {
125130 pub url : Option < UserUrl > ,
126131 pub description : UserEntitiesDescription ,
@@ -132,6 +137,7 @@ pub struct UserEntities {
132137 feature = "lib-rustc-serialize" ,
133138 derive( RustcEncodable , RustcDecodable )
134139) ]
140+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
135141pub struct UserUrl {
136142 pub urls : Vec < Url > ,
137143}
@@ -142,6 +148,7 @@ pub struct UserUrl {
142148 feature = "lib-rustc-serialize" ,
143149 derive( RustcEncodable , RustcDecodable )
144150) ]
151+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
145152pub struct Url {
146153 pub url : String ,
147154 pub expanded_url : String ,
@@ -155,6 +162,7 @@ pub struct Url {
155162 feature = "lib-rustc-serialize" ,
156163 derive( RustcEncodable , RustcDecodable )
157164) ]
165+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
158166pub struct UserEntitiesDescription {
159167 pub urls : Vec < Url > ,
160168}
@@ -165,6 +173,7 @@ pub struct UserEntitiesDescription {
165173 feature = "lib-rustc-serialize" ,
166174 derive( RustcEncodable , RustcDecodable )
167175) ]
176+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
168177pub struct StatusEntities {
169178 pub hashtags : Vec < Hashtag > ,
170179 pub symbols : empty:: Array ,
@@ -179,6 +188,7 @@ pub struct StatusEntities {
179188 feature = "lib-rustc-serialize" ,
180189 derive( RustcEncodable , RustcDecodable )
181190) ]
191+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
182192pub struct Hashtag {
183193 pub text : String ,
184194 pub indices : Indices ,
@@ -190,6 +200,7 @@ pub struct Hashtag {
190200 feature = "lib-rustc-serialize" ,
191201 derive( RustcEncodable , RustcDecodable )
192202) ]
203+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
193204pub struct UserMention {
194205 pub screen_name : String ,
195206 pub name : String ,
@@ -200,6 +211,7 @@ pub struct UserMention {
200211
201212#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
202213#[ cfg_attr( feature = "serde" , serde( deny_unknown_fields) ) ]
214+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
203215pub struct Media {
204216 pub id : LongId ,
205217 pub id_str : LongIdStr ,
@@ -222,6 +234,7 @@ pub struct Media {
222234 feature = "lib-rustc-serialize" ,
223235 derive( RustcEncodable , RustcDecodable )
224236) ]
237+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
225238pub struct Sizes {
226239 pub medium : Size ,
227240 pub small : Size ,
@@ -235,6 +248,7 @@ pub struct Sizes {
235248 feature = "lib-rustc-serialize" ,
236249 derive( RustcEncodable , RustcDecodable )
237250) ]
251+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
238252pub struct Size {
239253 pub w : u16 ,
240254 pub h : u16 ,
@@ -249,6 +263,7 @@ pub type Indices = (u8, u8);
249263 feature = "lib-rustc-serialize" ,
250264 derive( RustcEncodable , RustcDecodable )
251265) ]
266+ #[ cfg_attr( feature = "lib-simd-json" , derive( simd_json_derive:: Serialize ) ) ]
252267pub struct SearchMetadata {
253268 pub completed_in : f32 ,
254269 pub max_id : LongId ,
0 commit comments