@@ -36,6 +36,7 @@ pub trait Encoder {
36
36
fn emit_str ( & mut self , v : & str ) -> Result < ( ) , Self :: Error > ;
37
37
38
38
// Compound types:
39
+ #[ inline]
39
40
fn emit_enum < F > ( & mut self , _name : & str , f : F ) -> Result < ( ) , Self :: Error >
40
41
where
41
42
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
@@ -57,6 +58,7 @@ pub trait Encoder {
57
58
f ( self )
58
59
}
59
60
61
+ #[ inline]
60
62
fn emit_enum_variant_arg < F > ( & mut self , _a_idx : usize , f : F ) -> Result < ( ) , Self :: Error >
61
63
where
62
64
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
@@ -89,13 +91,15 @@ pub trait Encoder {
89
91
self . emit_enum_variant_arg ( f_idx, f)
90
92
}
91
93
94
+ #[ inline]
92
95
fn emit_struct < F > ( & mut self , _name : & str , _len : usize , f : F ) -> Result < ( ) , Self :: Error >
93
96
where
94
97
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
95
98
{
96
99
f ( self )
97
100
}
98
101
102
+ #[ inline]
99
103
fn emit_struct_field < F > (
100
104
& mut self ,
101
105
_f_name : & str ,
@@ -108,13 +112,15 @@ pub trait Encoder {
108
112
f ( self )
109
113
}
110
114
115
+ #[ inline]
111
116
fn emit_tuple < F > ( & mut self , _len : usize , f : F ) -> Result < ( ) , Self :: Error >
112
117
where
113
118
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
114
119
{
115
120
f ( self )
116
121
}
117
122
123
+ #[ inline]
118
124
fn emit_tuple_arg < F > ( & mut self , _idx : usize , f : F ) -> Result < ( ) , Self :: Error >
119
125
where
120
126
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
@@ -164,6 +170,7 @@ pub trait Encoder {
164
170
f ( self )
165
171
}
166
172
173
+ #[ inline]
167
174
fn emit_seq_elt < F > ( & mut self , _idx : usize , f : F ) -> Result < ( ) , Self :: Error >
168
175
where
169
176
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
@@ -179,13 +186,15 @@ pub trait Encoder {
179
186
f ( self )
180
187
}
181
188
189
+ #[ inline]
182
190
fn emit_map_elt_key < F > ( & mut self , _idx : usize , f : F ) -> Result < ( ) , Self :: Error >
183
191
where
184
192
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
185
193
{
186
194
f ( self )
187
195
}
188
196
197
+ #[ inline]
189
198
fn emit_map_elt_val < F > ( & mut self , _idx : usize , f : F ) -> Result < ( ) , Self :: Error >
190
199
where
191
200
F : FnOnce ( & mut Self ) -> Result < ( ) , Self :: Error > ,
@@ -218,13 +227,15 @@ pub trait Decoder {
218
227
fn read_str ( & mut self ) -> Result < Cow < ' _ , str > , Self :: Error > ;
219
228
220
229
// Compound types:
230
+ #[ inline]
221
231
fn read_enum < T , F > ( & mut self , _name : & str , f : F ) -> Result < T , Self :: Error >
222
232
where
223
233
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
224
234
{
225
235
f ( self )
226
236
}
227
237
238
+ #[ inline]
228
239
fn read_enum_variant < T , F > ( & mut self , _names : & [ & str ] , mut f : F ) -> Result < T , Self :: Error >
229
240
where
230
241
F : FnMut ( & mut Self , usize ) -> Result < T , Self :: Error > ,
@@ -233,6 +244,7 @@ pub trait Decoder {
233
244
f ( self , disr)
234
245
}
235
246
247
+ #[ inline]
236
248
fn read_enum_variant_arg < T , F > ( & mut self , _a_idx : usize , f : F ) -> Result < T , Self :: Error >
237
249
where
238
250
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
@@ -259,13 +271,15 @@ pub trait Decoder {
259
271
self . read_enum_variant_arg ( f_idx, f)
260
272
}
261
273
274
+ #[ inline]
262
275
fn read_struct < T , F > ( & mut self , _s_name : & str , _len : usize , f : F ) -> Result < T , Self :: Error >
263
276
where
264
277
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
265
278
{
266
279
f ( self )
267
280
}
268
281
282
+ #[ inline]
269
283
fn read_struct_field < T , F > (
270
284
& mut self ,
271
285
_f_name : & str ,
@@ -278,13 +292,15 @@ pub trait Decoder {
278
292
f ( self )
279
293
}
280
294
295
+ #[ inline]
281
296
fn read_tuple < T , F > ( & mut self , _len : usize , f : F ) -> Result < T , Self :: Error >
282
297
where
283
298
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
284
299
{
285
300
f ( self )
286
301
}
287
302
303
+ #[ inline]
288
304
fn read_tuple_arg < T , F > ( & mut self , _a_idx : usize , f : F ) -> Result < T , Self :: Error >
289
305
where
290
306
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
@@ -328,6 +344,7 @@ pub trait Decoder {
328
344
f ( self , len)
329
345
}
330
346
347
+ #[ inline]
331
348
fn read_seq_elt < T , F > ( & mut self , _idx : usize , f : F ) -> Result < T , Self :: Error >
332
349
where
333
350
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
@@ -343,13 +360,15 @@ pub trait Decoder {
343
360
f ( self , len)
344
361
}
345
362
363
+ #[ inline]
346
364
fn read_map_elt_key < T , F > ( & mut self , _idx : usize , f : F ) -> Result < T , Self :: Error >
347
365
where
348
366
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
349
367
{
350
368
f ( self )
351
369
}
352
370
371
+ #[ inline]
353
372
fn read_map_elt_val < T , F > ( & mut self , _idx : usize , f : F ) -> Result < T , Self :: Error >
354
373
where
355
374
F : FnOnce ( & mut Self ) -> Result < T , Self :: Error > ,
0 commit comments