|
@@ -161,6 +161,21 @@ impl<T: serde::Serialize + serde::de::DeserializeOwned + Clone> AsMut<T> for Ser
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+impl<T: serde::Serialize + serde::de::DeserializeOwned + Clone> std::ops::Deref for Serialized<T> {
|
|
|
+ type Target = T;
|
|
|
+ fn deref(&self) -> &Self::Target {
|
|
|
+ &self.wrapped
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+impl<T: serde::Serialize + serde::de::DeserializeOwned + Clone> std::ops::DerefMut
|
|
|
+ for Serialized<T>
|
|
|
+{
|
|
|
+ fn deref_mut(&mut self) -> &mut Self::Target {
|
|
|
+ &mut self.wrapped
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
impl<T: 'static + serde::Serialize + serde::de::DeserializeOwned + std::fmt::Debug + Clone> Datum
|
|
|
for Serialized<T>
|
|
|
{
|