pub trait Entity {
type Id: Clone + Eq + Hash + Send + Sync + 'static;
// Required method
fn id(&self) -> &Self::Id;
}Expand description
A domain object that is identified by its Id, not by its
attribute values. Two Entity instances with the same Id represent
the same conceptual thing even if their other fields differ.