pub trait KeyComparable { type Key: PartialEq + ?Sized; // Required method fn key(&self) -> &Self::Key; }
A trait for comparing types only by a certain key.
Key type for comparisons.
Returns a reference to the key.