Implement strum::Display
for all DomainEvent
s
#38
Labels
Enhancement
New feature or improvement to an existing feature
strum::Display
for all DomainEvent
s
#38
Description
The
DomainEvent
trait consists on anevent_type
method which should return the enum variant's name. Currently we implement this like so:Where we manually need to add match arms for each enum variant (event) that we want to add.
This is a bit cumbersome so a better solution for this would be to simply derive the
strum::Display
trait on all enums that implementDomainEvent
, i.e.:Motivation
Using this method is much less error-prone
Resources
n/a
To-do List
strum::Display
for allDomainEvent
implementationsThe text was updated successfully, but these errors were encountered: