≈ the.bay.news

Serde: Implementing deserialize_struct for my custom deserializer

The Rust Programming Language Forum
Serde: Implementing deserialize_struct for my custom deserializer
I try to implement my own custom Serde deserializer. I made some progress with simple data types, but struggle to get deserialize_struct working. The signature looks like fn deserialize_struct<V>( self, name: &'static str, fields: &'static [&'static str], visitor: V, ) -> Result<V::Value, Self::Error> where V: Visitor<'de>, { // ??? } so I'm obviously expected to create an instance of V::Value and return it. For my tests I use the following struct #[derive(Debug, Deser...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.