#[derive(DomainEvent)]Expand description
English:
Implements the empty ddd_toolkit_core::DomainEvent marker for
a struct or enum, preserving its generic parameters and where clause.
Does not add methods, serialization, Send, or Sync bounds. Event contents
and delivery remain the caller’s responsibility. Unions and missing core
dependencies produce compile errors.
日本語:
構造体または列挙型に、空の ddd_toolkit_core::DomainEvent
マーカーを実装し、ジェネリック引数と where 節を維持します。
メソッド、直列化、Send・Sync 境界は追加しません。イベントの内容と配信は
呼び出し側が管理します。共用体やコア依存の欠落はコンパイルエラーになります。
§Example / 使用例
use ddd_toolkit_macro::DomainEvent;
#[derive(DomainEvent)]
enum OrderEvent { Placed { order_id: u64 }, Cancelled }
fn accept_event(_: impl ddd_toolkit_core::DomainEvent) {}
accept_event(OrderEvent::Placed { order_id: 1 });