@@ -24,23 +24,23 @@ macro_rules! write_primitive {
2424////////////////////////////////////////////////////////////////////////////////////////////////////
2525
2626/// A serializer used to serialize element with specified name.
27- pub struct ElementSerializer < ' k , W : Write > {
28- pub ser : ContentSerializer < ' k , W > ,
27+ pub struct ElementSerializer < ' w , ' k , W : Write > {
28+ pub ser : ContentSerializer < ' w , ' k , W > ,
2929 /// Tag name used to wrap serialized types except enum variants which uses the variant name
3030 pub ( super ) key : XmlName < ' k > ,
3131}
3232
33- impl < ' k , W : Write > Serializer for ElementSerializer < ' k , W > {
33+ impl < ' w , ' k , W : Write > Serializer for ElementSerializer < ' w , ' k , W > {
3434 type Ok = ( ) ;
3535 type Error = DeError ;
3636
3737 type SerializeSeq = Self ;
3838 type SerializeTuple = Self ;
3939 type SerializeTupleStruct = Self ;
4040 type SerializeTupleVariant = Self ;
41- type SerializeMap = Map < ' k , W > ;
42- type SerializeStruct = Struct < ' k , W > ;
43- type SerializeStructVariant = Struct < ' k , W > ;
41+ type SerializeMap = Map < ' w , ' k , W > ;
42+ type SerializeStruct = Struct < ' w , ' k , W > ;
43+ type SerializeStructVariant = Struct < ' w , ' k , W > ;
4444
4545 write_primitive ! ( serialize_bool( bool ) ) ;
4646
@@ -200,7 +200,7 @@ impl<'k, W: Write> Serializer for ElementSerializer<'k, W> {
200200 }
201201}
202202
203- impl < ' k , W : Write > SerializeSeq for ElementSerializer < ' k , W > {
203+ impl < ' w , ' k , W : Write > SerializeSeq for ElementSerializer < ' w , ' k , W > {
204204 type Ok = ( ) ;
205205 type Error = DeError ;
206206
@@ -223,7 +223,7 @@ impl<'k, W: Write> SerializeSeq for ElementSerializer<'k, W> {
223223 }
224224}
225225
226- impl < ' k , W : Write > SerializeTuple for ElementSerializer < ' k , W > {
226+ impl < ' w , ' k , W : Write > SerializeTuple for ElementSerializer < ' w , ' k , W > {
227227 type Ok = ( ) ;
228228 type Error = DeError ;
229229
@@ -241,7 +241,7 @@ impl<'k, W: Write> SerializeTuple for ElementSerializer<'k, W> {
241241 }
242242}
243243
244- impl < ' k , W : Write > SerializeTupleStruct for ElementSerializer < ' k , W > {
244+ impl < ' w , ' k , W : Write > SerializeTupleStruct for ElementSerializer < ' w , ' k , W > {
245245 type Ok = ( ) ;
246246 type Error = DeError ;
247247
@@ -259,7 +259,7 @@ impl<'k, W: Write> SerializeTupleStruct for ElementSerializer<'k, W> {
259259 }
260260}
261261
262- impl < ' k , W : Write > SerializeTupleVariant for ElementSerializer < ' k , W > {
262+ impl < ' w , ' k , W : Write > SerializeTupleVariant for ElementSerializer < ' w , ' k , W > {
263263 type Ok = ( ) ;
264264 type Error = DeError ;
265265
@@ -286,16 +286,16 @@ impl<'k, W: Write> SerializeTupleVariant for ElementSerializer<'k, W> {
286286/// - attributes written directly to the higher serializer
287287/// - elements buffered into internal buffer and at the end written into higher
288288/// serializer
289- pub struct Struct < ' k , W : Write > {
290- ser : ElementSerializer < ' k , W > ,
289+ pub struct Struct < ' w , ' k , W : Write > {
290+ ser : ElementSerializer < ' w , ' k , W > ,
291291 /// Buffer to store serialized elements
292292 // TODO: Customization point: allow direct writing of elements, but all
293293 // attributes should be listed first. Fail, if attribute encountered after
294294 // element. Use feature to configure
295295 children : String ,
296296}
297297
298- impl < ' k , W : Write > Struct < ' k , W > {
298+ impl < ' w , ' k , W : Write > Struct < ' w , ' k , W > {
299299 #[ inline]
300300 fn write_field < T > ( & mut self , key : & str , value : & T ) -> Result < ( ) , DeError >
301301 where
@@ -370,7 +370,7 @@ impl<'k, W: Write> Struct<'k, W> {
370370 }
371371}
372372
373- impl < ' k , W : Write > SerializeStruct for Struct < ' k , W > {
373+ impl < ' w , ' k , W : Write > SerializeStruct for Struct < ' w , ' k , W > {
374374 type Ok = ( ) ;
375375 type Error = DeError ;
376376
@@ -400,7 +400,7 @@ impl<'k, W: Write> SerializeStruct for Struct<'k, W> {
400400 }
401401}
402402
403- impl < ' k , W : Write > SerializeStructVariant for Struct < ' k , W > {
403+ impl < ' w , ' k , W : Write > SerializeStructVariant for Struct < ' w , ' k , W > {
404404 type Ok = ( ) ;
405405 type Error = DeError ;
406406
@@ -420,14 +420,14 @@ impl<'k, W: Write> SerializeStructVariant for Struct<'k, W> {
420420
421421////////////////////////////////////////////////////////////////////////////////////////////////////
422422
423- pub struct Map < ' k , W : Write > {
424- ser : Struct < ' k , W > ,
423+ pub struct Map < ' w , ' k , W : Write > {
424+ ser : Struct < ' w , ' k , W > ,
425425 /// Key, serialized by `QNameSerializer` if consumer uses `serialize_key` +
426426 /// `serialize_value` calls instead of `serialize_entry`
427427 key : Option < String > ,
428428}
429429
430- impl < ' k , W : Write > Map < ' k , W > {
430+ impl < ' w , ' k , W : Write > Map < ' w , ' k , W > {
431431 fn make_key < T > ( & mut self , key : & T ) -> Result < String , DeError >
432432 where
433433 T : ?Sized + Serialize ,
@@ -438,7 +438,7 @@ impl<'k, W: Write> Map<'k, W> {
438438 }
439439}
440440
441- impl < ' k , W : Write > SerializeMap for Map < ' k , W > {
441+ impl < ' w , ' k , W : Write > SerializeMap for Map < ' w , ' k , W > {
442442 type Ok = ( ) ;
443443 type Error = DeError ;
444444
0 commit comments