(&self, names: &[&str])
| 39 | |
| 40 | impl ResourceCollection { |
| 41 | pub(crate) fn filter(&self, names: &[&str]) -> ResourceCollection { |
| 42 | ResourceCollection { |
| 43 | resources: names |
| 44 | .iter() |
| 45 | .map(|&name| self.resources.get_key_value(name)) |
| 46 | .flatten() |
| 47 | .map(|(k, v)| (k.clone(), *v)) |
| 48 | .collect(), |
| 49 | storage: self.storage.clone(), |
| 50 | } |
| 51 | } |
| 52 | // Chain two ResourceCollections, and `other` will overwrite `self` |
| 53 | pub(crate) async fn chain(self, mut other: UniqueResourceCollection) -> ResourceCollection { |
| 54 | let other_storage = other.storage.get_mut(); |
no test coverage detected