(&self, name: &str)
| 1411 | /// returns error if not found |
| 1412 | #[allow(dead_code)] |
| 1413 | pub fn remove_collection(&self, name: &str) -> Result<Arc<Collection>, WaCustomError> { |
| 1414 | match self.inner_collections.remove(name) { |
| 1415 | Some((_, collection)) => Ok(collection), |
| 1416 | None => { |
| 1417 | // collection not found, return an error response |
| 1418 | Err(WaCustomError::NotFound("collection".into())) |
| 1419 | } |
| 1420 | } |
| 1421 | } |
| 1422 | |
| 1423 | /// returns an iterator |
| 1424 | #[allow(dead_code)] |
no test coverage detected