MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / push_child_to_last

Method push_child_to_last

atomic-core/src/output/alive/graph.rs:212–217  ·  view source on GitHub ↗

Push a child and increment the last span's child count. This is a convenience method that combines pushing a child and updating the count on the most recently added span. # Panics Panics if the graph has no vertices.

(&mut self, edge: Option<SerializedGraphEdge>, child: VertexId)

Source from the content-addressed store, hash-verified

210 ///
211 /// Panics if the graph has no vertices.
212 pub fn push_child_to_last(&mut self, edge: Option<SerializedGraphEdge>, child: VertexId) {
213 self.children.push((edge, child));
214 if let Some(last) = self.vertices.last_mut() {
215 last.n_children += 1;
216 }
217 }
218
219 /// Set the children start index for the last span.
220 ///

Calls 1

pushMethod · 0.45