Crate dervy

Source
Expand description

In domain-driven design, entity types should be compared by identity rather than value.

[dervy] allows you to annotate your domain entities in order to derive implementations of PartialEq, Eq, and Hash that only consider identity for equality.

Derive Macrosยง

Entity
Derive PartialEq, Eq, and Hash for this entity type by considering the field annotated with #[dervy(id)]