"You can't implement a trait for a type you didn't define"
HAH, I'll just define a new type that's just a wrapper for that type.
"Okay. But that means you have to write your own deserialization macros."
..oh. WELL I DID THAT.
"Sure, you did that for the string to the type. But did you do it for your wrapper too?"
I, uh, well.
"Oh, and the deserialization function has to be a member of trait Visitor. Which we only defined for default types"
...i'm gonna go be sad while I figure out how to implement that trait :(
coding woes, Afficher plus
This solved my issue, if anyone's seriously following this.
Basically I'm trying to process a JSON where it will give me another URL if there's more data to retrieve.
So I need to pull in the JSON, deserialise it, and then put the URL into an enum of either
"There's more data"
or
"No more data"
and to do that I need to write a deserializer that understands what a URI is, so that hyper can use it properly, and then used regex on top of it to understand if I was seeing another URL or not.
https://github.com/serde-rs/serde/issues/177