pub enum UndoOp {
DropNode(NodeId),
RestoreNode {
node: GraphNode,
edges: Vec<GraphEdge>,
},
DropEdge(GraphEdge),
RestoreEdge(GraphEdge),
RestoreEmbedding {
id: NodeId,
emb: Vec<f64>,
},
Unmerge {
merged: GraphNode,
merged_edges: Vec<GraphEdge>,
keep: NodeId,
keep_emb: Vec<f64>,
keep_ts: u64,
rewired: Vec<GraphEdge>,
},
Noop,
}Expand description
The exact pre-image needed to reverse one GraphOp.
Snapshots, not inverse op names: a delete or a merge cannot be reconstructed from its arguments, so the journal carries the removed node, its incident edges, and the surviving node’s overwritten embedding.
Variants§
DropNode(NodeId)
Reverse of AddNode.
RestoreNode
Reverse of DeleteNode.
Fields
DropEdge(GraphEdge)
Reverse of AddEdge.
RestoreEdge(GraphEdge)
Reverse of DeleteEdge.
RestoreEmbedding
Reverse of RelabelNode.
Unmerge
Reverse of MergeNodes.
Fields
Noop
The op was already satisfied; nothing to reverse (idempotency).
Trait Implementations§
impl StructuralPartialEq for UndoOp
Auto Trait Implementations§
impl Freeze for UndoOp
impl RefUnwindSafe for UndoOp
impl Send for UndoOp
impl Sync for UndoOp
impl Unpin for UndoOp
impl UnsafeUnpin for UndoOp
impl UnwindSafe for UndoOp
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