pub trait GraphOpBuilderExt {
// Required methods
fn build_remove_edge_op(&self, id: EdgeId) -> Option<GraphOp>;
fn build_remove_port_op(&self, id: PortId) -> Option<GraphOp>;
fn build_disconnect_port_ops(&self, id: PortId) -> Option<Vec<GraphOp>>;
fn build_remove_port_tx(
&self,
id: PortId,
label: impl Into<String>,
) -> Option<GraphTransaction>;
fn build_remove_node_op(&self, id: NodeId) -> Option<GraphOp>;
fn build_remove_node_tx(
&self,
id: NodeId,
label: impl Into<String>,
) -> Option<GraphTransaction>;
fn build_remove_group_op(&self, id: GroupId) -> Option<GraphOp>;
fn build_remove_group_tx(
&self,
id: GroupId,
label: impl Into<String>,
) -> Option<GraphTransaction>;
fn build_remove_sticky_note_op(&self, id: StickyNoteId) -> Option<GraphOp>;
fn build_remove_sticky_note_tx(
&self,
id: StickyNoteId,
label: impl Into<String>,
) -> Option<GraphTransaction>;
fn build_remove_binding_op(&self, id: BindingId) -> Option<GraphOp>;
fn build_remove_binding_tx(
&self,
id: BindingId,
label: impl Into<String>,
) -> Option<GraphTransaction>;
}Expand description
Builder helpers for constructing safe, reversible edit operations.
These helpers:
- snapshot the removed data needed for undo,
- produce ops in a valid apply order,
- use deterministic ordering for stability.
Required Methods§
Sourcefn build_remove_edge_op(&self, id: EdgeId) -> Option<GraphOp>
fn build_remove_edge_op(&self, id: EdgeId) -> Option<GraphOp>
Builds a RemoveEdge op for an existing edge.
Sourcefn build_remove_port_op(&self, id: PortId) -> Option<GraphOp>
fn build_remove_port_op(&self, id: PortId) -> Option<GraphOp>
Builds a RemovePort op for an existing port, including incident edges.
Sourcefn build_disconnect_port_ops(&self, id: PortId) -> Option<Vec<GraphOp>>
fn build_disconnect_port_ops(&self, id: PortId) -> Option<Vec<GraphOp>>
Builds ops that disconnect all edges incident to the port.
The ops are returned in deterministic order.
Sourcefn build_remove_port_tx(
&self,
id: PortId,
label: impl Into<String>,
) -> Option<GraphTransaction>
fn build_remove_port_tx( &self, id: PortId, label: impl Into<String>, ) -> Option<GraphTransaction>
Builds a transaction that removes a port (and its incident edges).
Sourcefn build_remove_node_op(&self, id: NodeId) -> Option<GraphOp>
fn build_remove_node_op(&self, id: NodeId) -> Option<GraphOp>
Builds a RemoveNode op for an existing node, including owned ports and incident edges.
Sourcefn build_remove_node_tx(
&self,
id: NodeId,
label: impl Into<String>,
) -> Option<GraphTransaction>
fn build_remove_node_tx( &self, id: NodeId, label: impl Into<String>, ) -> Option<GraphTransaction>
Builds a transaction that removes a node (and its ports/edges).
Sourcefn build_remove_group_op(&self, id: GroupId) -> Option<GraphOp>
fn build_remove_group_op(&self, id: GroupId) -> Option<GraphOp>
Builds a RemoveGroup op for an existing group, including nodes detached from it.
Sourcefn build_remove_group_tx(
&self,
id: GroupId,
label: impl Into<String>,
) -> Option<GraphTransaction>
fn build_remove_group_tx( &self, id: GroupId, label: impl Into<String>, ) -> Option<GraphTransaction>
Builds a transaction that removes a group (and detaches any child nodes).
Sourcefn build_remove_sticky_note_op(&self, id: StickyNoteId) -> Option<GraphOp>
fn build_remove_sticky_note_op(&self, id: StickyNoteId) -> Option<GraphOp>
Builds a RemoveStickyNote op for an existing sticky note, including attached bindings.
Sourcefn build_remove_sticky_note_tx(
&self,
id: StickyNoteId,
label: impl Into<String>,
) -> Option<GraphTransaction>
fn build_remove_sticky_note_tx( &self, id: StickyNoteId, label: impl Into<String>, ) -> Option<GraphTransaction>
Builds a transaction that removes a sticky note and attached bindings.
Sourcefn build_remove_binding_op(&self, id: BindingId) -> Option<GraphOp>
fn build_remove_binding_op(&self, id: BindingId) -> Option<GraphOp>
Builds a RemoveBinding op for an existing binding.
Sourcefn build_remove_binding_tx(
&self,
id: BindingId,
label: impl Into<String>,
) -> Option<GraphTransaction>
fn build_remove_binding_tx( &self, id: BindingId, label: impl Into<String>, ) -> Option<GraphTransaction>
Builds a transaction that removes a binding.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".