From e8ea01319b3a9032a3f4f69f65e9ca96562b87b9 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sun, 22 Jan 2023 11:49:47 +0800 Subject: forest: clone correctly Now the forest can detect if a node is packed or cloned, and correctly clones a node in those circumstances. But it still needs to be tested. --- graph/src/builder.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'graph/src/builder.rs') diff --git a/graph/src/builder.rs b/graph/src/builder.rs index b04e7f6..c5f9252 100644 --- a/graph/src/builder.rs +++ b/graph/src/builder.rs @@ -82,6 +82,9 @@ pub trait BuilderMut { /// Add an edge from the source to the target. fn add_edge(&mut self, source: usize, target: usize, label: Self::Label) -> Result<(), Error>; + /// Set the label of an existing node to a new label. + fn set_label(&mut self, node_id: usize, label: Self::Label) -> Result<(), Error>; + /// Remove an edge from the source to the target. /// /// Since some graphs are labelled, the users are allowed to pass -- cgit v1.2.3-18-g5258