Had to put this down for awhile and come back with a clean head (can't spell "frustrating" without "rust"), but this finally works and now I can build higher-level API wrappers around this primitive.
@stevestreza my rust code still uses things like DeserializeOwned because I’m never sure if I can even figure out the lifetime situation of the alternative.
@jfro I might be complicating the situation by decoding to a generic container, but yeah I have no idea what the difference is. My best guess is that Deserialize does a move and DeserializeOwned does a copy/clone, and performance-sensitive apps might want zero-copy behavior?
@stevestreza yeah DeserializeOwned makes it so you can just keep things simple and your decodes types have things like String instead of say &str. I haven’t tried at all to do the non owned way. But yeah imagine it’d be good if you need to avoid copies/allocations
The original server operated by the Mastodon gGmbH non-profit