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

Method find_node

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

Find a node by ID.

(&self, id: &str)

Source from the content-addressed store, hash-verified

409
410 /// Find a node by ID.
411 pub fn find_node(&self, id: &str) -> Option<&ProvenanceNode> {
412 self.nodes.iter().find(|n| n.id == id)
413 }
414
415 /// Find all nodes of a given kind.
416 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