I am trying to use a map to search for its deserialization function by type name.
table: HashMap<&'static str, for<'de> fn(
&mut dyn erased_serde::Deserializer<'de>,
) -> Result<Box<dyn View>, erased_serde::Error>>
As you can see, the only error types he can return are erased_serde::Error, Therefore, I may need the unerase_de function to seamlessly integrate it with other deserializer.
erased_serde::de::DeserializeSeed
Is there a better practice? Or consider making the erased_serde::de::DeserializeSeed public as a replacement for the function pointer I am using here?
Thank you!
I am trying to use a map to search for its deserialization function by type name.
As you can see, the only error types he can return are
erased_serde::Error, Therefore, I may need theunerase_defunction to seamlessly integrate it with other deserializer.erased_serde::de::DeserializeSeedIs there a better practice? Or consider making the
erased_serde::de::DeserializeSeedpublic as a replacement for the function pointer I am using here?Thank you!