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

Method add_extra_child

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

Add an extra child to a span. Extra children are stored directly on the span rather than in the shared array. This is useful when edges are discovered after initial graph construction. # Arguments `id` - The parent span ID `edge` - The edge to the child `child` - The child span ID

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

Source from the content-addressed store, hash-verified

351 /// * `edge` - The edge to the child
352 /// * `child` - The child span ID
353 pub fn add_extra_child(
354 &mut self,
355 id: VertexId,
356 edge: Option<SerializedGraphEdge>,
357 child: VertexId,
358 ) {
359 self.vertices[id.index()].extra.push((edge, child));
360 }
361
362 /// Iterate over all vertices.
363 pub fn iter_vertices(&self) -> impl Iterator<Item = (VertexId, &AliveVertex)> {

Calls 2

pushMethod · 0.45
indexMethod · 0.45