Iterate over a span's children. This includes both the children in the shared array and any extra children attached to the span. # Arguments `id` - The span whose children to iterate # Returns An iterator over `(Option , child_id)` pairs.
(
&self,
id: VertexId,
)
| 274 | /// |
| 275 | /// An iterator over `(Option<edge>, child_id)` pairs. |
| 276 | pub fn children( |
| 277 | &self, |
| 278 | id: VertexId, |
| 279 | ) -> impl Iterator<Item = &(Option<SerializedGraphEdge>, VertexId)> { |
| 280 | let v = &self.vertices[id.index()]; |
| 281 | let start = v.children; |
| 282 | let end = start + v.n_children; |
| 283 | |
| 284 | self.children[start..end].iter().chain(v.extra.iter()) |
| 285 | } |
| 286 | |
| 287 | /// Get a specific child by index. |
| 288 | /// |