MCPcopy Create free account
hub / github.com/cosdata/cosdata / remove_collection

Method remove_collection

src/models/types.rs:1413–1421  ·  view source on GitHub ↗
(&self, name: &str)

Source from the content-addressed store, hash-verified

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)]

Callers 1

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected