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

Method is_provenance_graph

atomic-core/src/change/provenance_graph/mod.rs:347–349  ·  view source on GitHub ↗

Check whether a byte slice looks like a provenance graph file. Fast check — only inspects the 4-byte magic prefix.

(data: &[u8])

Source from the content-addressed store, hash-verified

345 ///
346 /// Fast check — only inspects the 4-byte magic prefix.
347 pub fn is_provenance_graph(data: &[u8]) -> bool {
348 data.len() >= MAGIC.len() && &data[..4] == MAGIC
349 }
350
351 /// Number of nodes in the graph.
352 pub fn node_count(&self) -> usize {

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected