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,
)
| 297 | /// |
| 298 | /// An iterator over `(Option<edge>, child_id)` pairs. |
| 299 | pub fn children( |
| 300 | &self, |
| 301 | id: VertexId, |
| 302 | ) -> impl Iterator<Item = &(Option<SerializedGraphEdge>, VertexId)> { |
| 303 | let v = &self.vertices[id.index()]; |
| 304 | let start = v.children; |
| 305 | let end = start + v.n_children; |
| 306 | |
| 307 | self.children[start..end].iter().chain(v.extra.iter()) |
| 308 | } |
| 309 | |
| 310 | /// Get a specific child by index. |
| 311 | /// |