Skip to main content

jellyflow_runtime/runtime/xyflow/changes/
edge.rs

1use serde::{Deserialize, Serialize};
2
3use jellyflow_core::core::{Edge, EdgeId, EdgeKind, EdgeReconnectable, PortId};
4
5/// Changes targeting edges (graph-owned).
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(tag = "type", rename_all = "snake_case")]
8pub enum EdgeChange {
9    Add {
10        id: EdgeId,
11        edge: Edge,
12    },
13    Remove {
14        id: EdgeId,
15    },
16
17    Kind {
18        id: EdgeId,
19        kind: EdgeKind,
20    },
21    Selectable {
22        id: EdgeId,
23        selectable: Option<bool>,
24    },
25    Focusable {
26        id: EdgeId,
27        focusable: Option<bool>,
28    },
29    Hidden {
30        id: EdgeId,
31        hidden: bool,
32    },
33    InteractionWidth {
34        id: EdgeId,
35        interaction_width: Option<f32>,
36    },
37    Deletable {
38        id: EdgeId,
39        deletable: Option<bool>,
40    },
41    Reconnectable {
42        id: EdgeId,
43        reconnectable: Option<EdgeReconnectable>,
44    },
45    Endpoints {
46        id: EdgeId,
47        from: PortId,
48        to: PortId,
49    },
50}