Skip to content

Deserialize something into HashMap<Cow<'a, str>, MyStruct<;'a>> #597

Answered by jonasbb
mainrs asked this question in Q&A
Discussion options

You must be logged in to vote

You are missing some key details in your question, so it is hard to answer. If you provide a small compilable example, that makes is much easier to see what is going on and, very importantly, shows the error messages you get.

I think you might have the problem from #202.
In that case, the correct attribute is #[serde_as(as = "HashMap<BorrowCow, _>")].

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jonasbb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants