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

Method get_loaded_collections

src/models/collection_cache.rs:232–244  ·  view source on GitHub ↗

Gets a list of all currently loaded collections

(&self)

Source from the content-addressed store, hash-verified

230
231 // Gets a list of all currently loaded collections
232 pub fn get_loaded_collections(&self) -> Vec<String> {
233 self.name_to_key
234 .iter()
235 .filter_map(|entry| {
236 let key = entry.value();
237 if self.cache.get(key).is_some() {
238 Some(entry.key().clone())
239 } else {
240 None
241 }
242 })
243 .collect()
244 }
245
246 // Checks if a collection is loaded
247 #[allow(dead_code)]

Callers 1

get_loaded_collectionsFunction · 0.80

Calls 4

cloneMethod · 0.80
iterMethod · 0.45
getMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected