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

Method add_extra_child

atomic-core/src/output/alive/graph.rs:330–337  ·  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

328 /// * `edge` - The edge to the child
329 /// * `child` - The child span ID
330 pub fn add_extra_child(
331 &mut self,
332 id: VertexId,
333 edge: Option<SerializedGraphEdge>,
334 child: VertexId,
335 ) {
336 self.vertices[id.index()].extra.push((edge, child));
337 }
338
339 /// Iterate over all vertices.
340 pub fn iter_vertices(&self) -> impl Iterator<Item = (VertexId, &AliveVertex)> {

Callers 3

test_graph_child_countFunction · 0.80

Calls 2

pushMethod · 0.45
indexMethod · 0.45

Tested by 3

test_graph_child_countFunction · 0.64