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

Method find_node

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

Find a node by ID.

(&self, id: &str)

Source from the content-addressed store, hash-verified

375
376 /// Find a node by ID.
377 pub fn find_node(&self, id: &str) -> Option<&ProvenanceNode> {
378 self.nodes.iter().find(|n| n.id == id)
379 }
380
381 /// Find all nodes of a given kind.
382 pub fn nodes_of_kind(&self, kind: ProvenanceNodeKind) -> Vec<&ProvenanceNode> {

Callers 1

test_find_nodeFunction · 0.80

Calls 1

iterMethod · 0.45

Tested by 1

test_find_nodeFunction · 0.64