eryon_rt/types/message.rs
1/*
2 Appellation: message <module>
3 Contrib: @FL03
4*/
5use rshyper::EdgeId;
6use rstmt::nrt::LPR;
7
8/// Messages that can be sent between nodes in the fragmented tonnetz
9#[derive(Clone, Debug)]
10pub enum NodeMessage {
11 /// Request to apply a transformation to a node
12 TransformRequest {
13 source: EdgeId,
14 target: EdgeId,
15 transform: LPR,
16 },
17 /// Synchronization of state between nodes
18 StateSync { source: EdgeId, state_hash: u64 },
19 /// Sharing of discovered pattern between nodes
20 PatternShare {
21 source: EdgeId,
22 pattern: Vec<LPR>,
23 importance: f32,
24 },
25}