pub trait KeyComparable { type Key: PartialEq<Self::Key> + ?Sized; 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.