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

Method nodes_of_kind

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

Find all nodes of a given kind.

(&self, kind: ProvenanceNodeKind)

Source from the content-addressed store, hash-verified

414
415 /// Find all nodes of a given kind.
416 pub fn nodes_of_kind(&self, kind: ProvenanceNodeKind) -> Vec<&ProvenanceNode> {
417 self.nodes.iter().filter(|n| n.kind == kind).collect()
418 }
419
420 /// Find all edges originating from a node.
421 pub fn edges_from(&self, node_id: &str) -> Vec<&ProvenanceEdge> {

Callers 2

fmtMethod · 0.80
test_nodes_of_kindFunction · 0.80

Calls 2

collectMethod · 0.45
iterMethod · 0.45

Tested by 1

test_nodes_of_kindFunction · 0.64