MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / get_graph_mut

Method get_graph_mut

graphlite/src/storage/storage_manager.rs:361–371  ·  view source on GitHub ↗

Get a mutable reference to a graph in the cache

(&self, name: &str)

Source from the content-addressed store, hash-verified

359
360 /// Get a mutable reference to a graph in the cache
361 pub fn get_graph_mut(&self, name: &str) -> Result<Option<GraphCache>, StorageError> {
362 // First ensure the graph is in the cache
363 if self.cache.get_graph(name)?.is_none() {
364 // Try to load it
365 if let Some(graph) = self.get_graph(name)? {
366 self.cache.add_graph(name.to_string(), graph)?;
367 }
368 }
369
370 self.cache.get_graph_mut(name)
371 }
372
373 /// Get access to the storage driver for metrics collection
374 pub fn get_storage_driver(

Callers

nothing calls this directly

Calls 2

get_graphMethod · 0.45
add_graphMethod · 0.45

Tested by

no test coverage detected