I am having a very hard time figuring out the impls for the crate serde_with, but don't eve know how to ask the question because I am not entirely clear on how it is supposed to work. I have been struggling with this for three or four days straight, reading the implementations of the traits in the crate itself. It still doesn't make sense, and everything I try confuses me more. How do you ask a question when there is no specific question to ask? I wouldn;t even know where to begin with creating a thread for this, I can only mention the goal and ope that someone else is familiar with serde_with. I know this is a relatively hard problem; but I would seriously appreciate some attention for it.
I'm trying to implement a wrapper type for serde that takes a struct's field, in one instance Vec<u64> and serialize with the adapter types JsonString and Base62. The adapters are used with an attribute macro on the field, such as #[serde_as(as = JsonString<Vec<Base62<u64>>>)].
JsonString<T>(PhantomData<T>) and Base62<T>(PhantomData<T>), both need to implement SerializeAs and DeserializeAs. I am getting very confused with the trait bounds and the call stack because it is nested so deep, and these types, especially with Deserializer::deserialize perform mutable operations on data they hold, and I don't now how to organize the interaction with it.