MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / for_collection

Method for_collection

nodedb-crdt/src/constraint.rs:139–144  ·  view source on GitHub ↗

Get all constraints for a given collection.

(&self, collection: &str)

Source from the content-addressed store, hash-verified

137
138 /// Get all constraints for a given collection.
139 pub fn for_collection(&self, collection: &str) -> Vec<&Constraint> {
140 self.constraints
141 .iter()
142 .filter(|c| c.collection == collection)
143 .collect()
144 }
145
146 /// Get all constraints.
147 pub fn all(&self) -> &[Constraint] {

Callers 2

validateMethod · 0.80

Calls 2

collectMethod · 0.80
iterMethod · 0.45

Tested by 1