pub unsafe trait CoerceKey<To: ?Sized>: Coerce<To> { }
Expand description

A marker trait such that the existence of From: CoerceKey<To> implies that From can be treat as To without any data manipulation. Furthermore, above and beyond Coerce, any provided Hash, Eq, PartialEq, Ord and PartialOrd traits must give identical results on the From and To values.

This trait is mostly expected to be a requirement for the keys of associative-map containers, hence the Key in the name.

Implementations on Foreign Types

Implementors