Get all constraints for a given collection.
(&self, collection: &str)
| 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] { |