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

Method nodes_of_kind

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

Find all nodes of a given kind.

(&self, kind: ProvenanceNodeKind)

Source from the content-addressed store, hash-verified

380
381 /// Find all nodes of a given kind.
382 pub fn nodes_of_kind(&self, kind: ProvenanceNodeKind) -> Vec<&ProvenanceNode> {
383 self.nodes.iter().filter(|n| n.kind == kind).collect()
384 }
385
386 /// Find all edges originating from a node.
387 pub fn edges_from(&self, node_id: &str) -> Vec<&ProvenanceEdge> {

Callers 2

fmtMethod · 0.80
test_nodes_of_kindFunction · 0.80

Calls 1

iterMethod · 0.45

Tested by 1

test_nodes_of_kindFunction · 0.64