pub enum GraphOp {
AddNode {
id: NodeId,
ntype: NodeType,
emb: Vec<f64>,
ts: u64,
},
DeleteNode {
id: NodeId,
},
AddEdge {
from: NodeId,
to: NodeId,
etype: EdgeType,
},
DeleteEdge {
from: NodeId,
to: NodeId,
etype: EdgeType,
},
RelabelNode {
id: NodeId,
emb: Vec<f64>,
},
MergeNodes {
keep: NodeId,
merged: NodeId,
},
}Expand description
The atomic mutation alphabet — exactly ℙ3’s elementary edits plus the 𝕃3 merge. Every op is idempotent and integrity-checked before commit.
Variants§
AddNode
Insert a typed node.
Fields
§
id: NodeIdArena identity (allocate with Graph::next_id).
DeleteNode
Remove a node and every incident edge (no dangling edges — 𝕃6).
AddEdge
Insert a typed edge between existing nodes.
DeleteEdge
Remove a typed edge.
RelabelNode
Replace a node’s embedding (ℙ3 relabel).
MergeNodes
Absorb merged into keep: re-point merged’s edges onto keep,
EMA-update keep’s embedding, then delete merged (𝕃3, spec §5.3).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GraphOp
impl<'de> Deserialize<'de> for GraphOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for GraphOp
Auto Trait Implementations§
impl Freeze for GraphOp
impl RefUnwindSafe for GraphOp
impl Send for GraphOp
impl Sync for GraphOp
impl Unpin for GraphOp
impl UnsafeUnpin for GraphOp
impl UnwindSafe for GraphOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more