pub enum ConductorMessage {
LeftToRight {
target_component_index: usize,
message: Dispatch,
},
RightToLeft {
source_component_index: SourceComponentIndex,
message: Dispatch,
},
}Expand description
Messages sent to the conductor’s main event loop for routing.
These messages enable the conductor to route communication between:
- The editor and the first component
- Components and their successors in the chain
- Components and their clients (editor or predecessor)
All spawned tasks send messages via this enum through a shared channel,
allowing centralized routing logic in the serve() loop.
Variants§
LeftToRight
If this message is a request or notification, then it is going “left-to-right” (e.g., a component making a request of its successor).
If this message is a response, then it is going right-to-left (i.e., the successor answering a request made by its predecessor).
RightToLeft
If this message is a request or notification, then it is going “right-to-left” (e.g., a component making a request of its predecessor).
If this message is a response, then it is going “left-to-right” (i.e., the predecessor answering a request made by its successor).