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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/// **English:** Owned next state and ordered effect descriptions returned by a [`ProcessManager`].
/// Construction and access do not execute effects or persist the state. Empty effects are valid;
/// callers choose how to coordinate state storage and effect execution.
///
/// **日本語:** [`ProcessManager`] が返す、所有された次状態と順序付きの副作用の記述です。
/// 構築や参照で副作用を実行したり状態を永続化したりしません。空の副作用列も許容し、
/// 状態保存と副作用実行の連携方法は呼び出し側が決めます。
///
/// **English:** Inspect the transition before taking ownership of both components.
///
/// **日本語:** 遷移を参照してから、両方の構成要素の所有権を取り出します。
///
/// ```rust
/// use ddd_toolkit_core::Transition;
///
/// let transition = Transition::new("paid", vec!["send receipt"]);
/// assert_eq!(transition.state(), &"paid");
/// assert_eq!(transition.effects(), &["send receipt"]);
/// let (state, effects) = transition.into_parts();
/// assert_eq!((state, effects), ("paid", vec!["send receipt"]));
/// ```
/// **English:** Computes a next state and effect descriptions from borrowed state and event values.
/// The caller owns persistence, event delivery, and effect execution. The signature does not enforce
/// determinism, reentrancy, idempotency, or purity; shared access can still use interior mutability.
/// Thread-safety bounds and panic behavior are left to implementations.
///
/// **日本語:** 借用した状態とイベントから、次状態と副作用の記述を算出します。
/// 永続化、イベント配信、副作用の実行は呼び出し側が担います。このシグネチャは決定性、再入可能性、
/// 冪等性、純粋性を強制せず、共有参照でも内部可変性を使えます。
/// スレッド安全性の境界とパニックの条件は実装が定めます。