#entity #design #entities #identity #type #partial-eq #domain-driven

macro dervy

Auto-derivation for entity types in domain-driven design

1 unstable release

0.1.0 Oct 23, 2024

#645 in Procedural macros

Download history 156/week @ 2024-10-21 7/week @ 2024-10-28 14/week @ 2024-11-04

177 downloads per month

Custom license

5KB

dervy

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.


lib.rs:

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.

Dependencies

~225–670KB
~16K SLoC