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