Open Kixunil opened 8 months ago
I'd like to be able to emit Spanned in rfc822-like. I think an API like this could work:
Spanned
impl<''de> Deserializer<'de> for MyDeserializer { // ... fn deserialize_struct<V: Visitor<'de>>(name: &'static str, fields: &'static [&'static str], visitor: V) -> Result<V::Value, Self::Error> { if serde_spanned::is_spanned(name, fields) { serde_spanned::emit_spanned(self, self.span) } else { // normal deserialization here } } }
Could you try patching in #635 and seeing if it works for you?
patch
Thanks for quick response! I don't expect to be able to do it very soon but will try not to lag too much.
I'd like to be able to emit
Spanned
in rfc822-like. I think an API like this could work: