WIP prototype migrations

This commit is contained in:
Dennis Kobert
2026-07-14 13:54:41 +02:00
parent 97f8113fe4
commit 6c084fb954
17 changed files with 827 additions and 3 deletions
+24
View File
@@ -11,6 +11,15 @@ pub struct Node {
}
impl Node {
pub fn new(implementation: Implementation, inputs: Vec<InputSlot>, attributes: Attributes, network: NetworkId) -> Self {
Self {
implementation,
inputs,
attributes,
network,
}
}
pub fn implementation(&self) -> &Implementation {
&self.implementation
}
@@ -24,6 +33,21 @@ impl Node {
self.network
}
// Mutable access for edits on a registry clone that is diffed back into deltas;
// live-session edits go through the delta paths instead.
pub fn implementation_mut(&mut self) -> &mut Implementation {
&mut self.implementation
}
pub fn inputs_mut(&mut self) -> &mut Vec<InputSlot> {
&mut self.inputs
}
pub fn attributes_mut(&mut self) -> &mut Attributes {
&mut self.attributes
}
pub fn set_network(&mut self, network: NetworkId) {
self.network = network;
}
/// True if both nodes agree on every value-bearing field, ignoring slot/attribute timestamps.
pub fn value_equal(&self, other: &Self) -> bool {
if self.implementation != other.implementation || self.network != other.network {