Skip to main content

DomainEvent

Derive Macro DomainEvent 

Source
#[derive(DomainEvent)]
{
    // Attributes available to this derive:
    #[domain_event]
    #[serde]
}
Expand description

Derive a typed explicit outward domain-event descriptor.

Use #[domain_event(name = "todo.completed", version = N)] for adapter output DTOs whose public contract differs from aggregate replay data.