I have a BTreeMap<u64, CustomType> dict as a non-public member of a struct. serde::Serialize is already derived for CustomType. The question is how do I derive Serialize for BTreeMap<u64,CustomType> without deriving it for the whole class?
@Daniel Papp that doesn't really make sense.
Serialize is implemented for
BTreeMap by Serde itself. You can't implement a trait you don't own for a type you don't own (How do I implement a trait I don't own for a type I don't own?)
i think you need to provide more detail about your goals and what you have now
I see. I figured it out in the meantime. I mean that I can only define a trait implementation at the crate either where the trait or the type that I want to implement it for reside.