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
//! Messages for cross-thread effect coordination.
use crate::effects::Effect;
/// Messages for cross-thread effect coordination.
#[derive(Debug, Clone)]
pub enum EffectCoordinationMessage {
/// Request to coordinate an effect
CoordinateEffect {
/// The effect to be coordinated
#[allow(dead_code)] // Part of Stage 3 effect coordination infrastructure
effect: Effect,
/// Unique sequence number for this coordination request
#[allow(dead_code)] // Part of Stage 3 effect coordination infrastructure
sequence: u64,
/// List of sequence numbers this effect depends on
#[allow(dead_code)] // Part of Stage 3 effect coordination infrastructure
dependencies: Vec<u64>,
},
/// Response to effect coordination request
#[allow(dead_code)] // Part of Stage 3 effect coordination infrastructure
CoordinationResponse {
/// Sequence number for request correlation
sequence: u64,
/// Whether the coordination was successful
success: bool,
/// Optional error message if coordination failed
error: Option<String>,
},
/// Notification that an effect completed
#[allow(dead_code)] // Part of Stage 3 effect coordination infrastructure
EffectCompleted {
/// Sequence number of the completed effect
sequence: u64,
/// Result of the effect execution
result: Result<String, String>,
},
/// Request to abort an effect
#[allow(dead_code)] // Part of Stage 3 effect coordination infrastructure
AbortEffect {
/// Sequence number of the effect to abort
sequence: u64,
/// Reason for aborting the effect
reason: String,
},
}