There is a third-party type T which doesn't implement Ord.
I need a map, with keys of type T, which has a deterministic serialization.
For every other type I just use BTreeMap<X, Y>, where X implements PartialOrd and Ord.
I can't implement PartialOrd and Ord for T as T is not defined in my crate.
How can I make a map from T to Y, with a deterministic serialization?