Replies: 1 comment
-
Hi @Lehona, I haven't figured out how to document this yet. Two transforms will work without problem (e.g., this test). A blanket implementation of |
Beta Was this translation helpful? Give feedback.
-
Hi @Lehona, I haven't figured out how to document this yet. Two transforms will work without problem (e.g., this test). A blanket implementation of |
Beta Was this translation helpful? Give feedback.
-
When trying to serialize a HashMap as a list of tuples (i.e. a
Vec<(_, _)>
) specifying both types causes serde_as to fail. Example:Fails:
Works:
Where
LocalPy
is an adapter for anyPy<T>
.I just figured out that leaving out one of the types works, but in the (rare) case that one needs to specify an adapter for both key and value, this wouldn't work. I don't see a reason why it wouldn't (I assume "inference" would infer the key type to be String anyway), so it's most likely just an oversight :)
Beta Was this translation helpful? Give feedback.
All reactions