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

Method new

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

Create a new, empty alive graph. The graph starts empty. You should typically push `AliveVertex::DUMMY` as the first span. # Example ```rust use atomic_core::output::alive::{AliveGraph, AliveVertex}; let mut graph = AliveGraph::new(); graph.push_vertex(AliveVertex::DUMMY); assert_eq!(graph.len_vertices(), 1); ```

()

Source from the content-addressed store, hash-verified

111 /// assert_eq!(graph.len_vertices(), 1);
112 /// ```
113 pub fn new() -> Self {
114 Self {
115 vertices: Vec::new(),
116 children: Vec::new(),
117 total_bytes: 0,
118 }
119 }
120
121 /// Create a graph with pre-allocated capacity.
122 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected