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)
| 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 | /// |