|
@@ -78,10 +78,10 @@ impl<'l> serde::Serializer for &'l ValueToStringSerializer {
|
|
|
Ok(None)
|
|
|
}
|
|
|
|
|
|
- fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error>
|
|
|
- where
|
|
|
- T: serde::Serialize,
|
|
|
- {
|
|
|
+ fn serialize_some<T: ?Sized + serde::Serialize>(
|
|
|
+ self,
|
|
|
+ value: &T,
|
|
|
+ ) -> Result<Self::Ok, Self::Error> {
|
|
|
value.serialize(self)
|
|
|
}
|
|
|
|
|
@@ -137,14 +137,11 @@ impl<'l> serde::Serializer for &'l ValueToStringSerializer {
|
|
|
todo!()
|
|
|
}
|
|
|
|
|
|
- fn serialize_newtype_struct<T: ?Sized>(
|
|
|
+ fn serialize_newtype_struct<T: ?Sized + serde::Serialize>(
|
|
|
self,
|
|
|
name: &'static str,
|
|
|
value: &T,
|
|
|
- ) -> Result<Self::Ok, Self::Error>
|
|
|
- where
|
|
|
- T: serde::Serialize,
|
|
|
- {
|
|
|
+ ) -> Result<Self::Ok, Self::Error> {
|
|
|
todo!()
|
|
|
}
|
|
|
|
|
@@ -158,16 +155,13 @@ impl<'l> serde::Serializer for &'l ValueToStringSerializer {
|
|
|
todo!()
|
|
|
}
|
|
|
|
|
|
- fn serialize_newtype_variant<T: ?Sized>(
|
|
|
+ fn serialize_newtype_variant<T: ?Sized + serde::Serialize>(
|
|
|
self,
|
|
|
name: &'static str,
|
|
|
variant_index: u32,
|
|
|
variant: &'static str,
|
|
|
value: &T,
|
|
|
- ) -> Result<Self::Ok, Self::Error>
|
|
|
- where
|
|
|
- T: serde::Serialize,
|
|
|
- {
|
|
|
+ ) -> Result<Self::Ok, Self::Error> {
|
|
|
todo!()
|
|
|
}
|
|
|
}
|
|
@@ -196,14 +190,11 @@ impl<'r, 's> serde::ser::SerializeStruct for ConfigSerializer<'r, 's> {
|
|
|
type Ok = ();
|
|
|
type Error = ConfigError;
|
|
|
|
|
|
- fn serialize_field<T: ?Sized>(
|
|
|
+ fn serialize_field<T: ?Sized + serde::Serialize>(
|
|
|
&mut self,
|
|
|
key: &'static str,
|
|
|
value: &T,
|
|
|
- ) -> Result<(), Self::Error>
|
|
|
- where
|
|
|
- T: serde::Serialize,
|
|
|
- {
|
|
|
+ ) -> Result<(), Self::Error> {
|
|
|
let key = format!("{}{}", self.prefix, key);
|
|
|
|
|
|
let value = value.serialize(&ValueToStringSerializer {})?;
|
|
@@ -291,10 +282,10 @@ impl<'r, 's> serde::Serializer for &'r ConfigSerializer<'r, 's> {
|
|
|
Ok(())
|
|
|
}
|
|
|
|
|
|
- fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error>
|
|
|
- where
|
|
|
- T: serde::Serialize,
|
|
|
- {
|
|
|
+ fn serialize_some<T: ?Sized + serde::Serialize>(
|
|
|
+ self,
|
|
|
+ value: &T,
|
|
|
+ ) -> Result<Self::Ok, Self::Error> {
|
|
|
todo!()
|
|
|
}
|
|
|
|
|
@@ -367,14 +358,11 @@ impl<'r, 's> serde::Serializer for &'r ConfigSerializer<'r, 's> {
|
|
|
todo!()
|
|
|
}
|
|
|
|
|
|
- fn serialize_newtype_struct<T: ?Sized>(
|
|
|
+ fn serialize_newtype_struct<T: ?Sized + serde::Serialize>(
|
|
|
self,
|
|
|
name: &'static str,
|
|
|
value: &T,
|
|
|
- ) -> Result<Self::Ok, Self::Error>
|
|
|
- where
|
|
|
- T: serde::Serialize,
|
|
|
- {
|
|
|
+ ) -> Result<Self::Ok, Self::Error> {
|
|
|
todo!()
|
|
|
}
|
|
|
|
|
@@ -388,16 +376,13 @@ impl<'r, 's> serde::Serializer for &'r ConfigSerializer<'r, 's> {
|
|
|
todo!()
|
|
|
}
|
|
|
|
|
|
- fn serialize_newtype_variant<T: ?Sized>(
|
|
|
+ fn serialize_newtype_variant<T: ?Sized + serde::Serialize>(
|
|
|
self,
|
|
|
name: &'static str,
|
|
|
variant_index: u32,
|
|
|
variant: &'static str,
|
|
|
value: &T,
|
|
|
- ) -> Result<Self::Ok, Self::Error>
|
|
|
- where
|
|
|
- T: serde::Serialize,
|
|
|
- {
|
|
|
+ ) -> Result<Self::Ok, Self::Error> {
|
|
|
todo!()
|
|
|
}
|
|
|
}
|