Comment on Return Generic Type in Rust
I_like_cats@lemmy.one 1 year ago
No. You can only return a single type from the function. You could return the serde_json::Value though so that the code calling this function can get the value it needs itself
wulf@lemmy.world 1 year ago
Afraid this might have been the case, if Ogeon’s suggestion doesn’t work out, I’ll probably end up with multiple getters, one per type. There aren’t that many anyway