1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! **English:** Defines conversion behavior for a [`crate::DomainEvent`] value.
//!
//! Implement [`DomainEventConversion`] when an event can be transformed into another representation
//! and the transformation may fail.
//!
//! **日本語:** [`crate::DomainEvent`] の値を変換する動作を定義します。
//!
//! イベントを別の表現へ変換でき、その変換が失敗する可能性がある場合に
//! [`DomainEventConversion`] を実装します。
use crateDomainEvent;
/// **English:** Converts a domain event into an associated output type.
///
/// The conversion borrows the event, so implementations can inspect it without taking ownership.
/// A failed conversion returns the associated [`Self::Error`] value and does not produce output.
/// The trait does not prescribe serialization, allocation, or whether the conversion is deterministic.
///
/// **日本語:** ドメインイベントを関連付けられた出力型へ変換します。
///
/// 変換はイベントを借用して行うため、所有権を取り上げずにイベントを検査できます。
/// 変換に失敗した場合は関連付けられた [`Self::Error`] の値を返し、出力は生成しません。
/// シリアライズ、メモリアロケーション、変換結果の決定性はこのトレイトでは規定しません。