Get a mutable reference to a graph
(&self, name: &str)
| 68 | |
| 69 | /// Get a mutable reference to a graph |
| 70 | pub fn get_graph_mut(&self, name: &str) -> Result<Option<GraphCache>, StorageError> { |
| 71 | debug!("Getting mutable graph: {}", name); |
| 72 | |
| 73 | let graphs = self |
| 74 | .graphs |
| 75 | .read() |
| 76 | .map_err(|e| StorageError::LockError(format!("Failed to acquire read lock: {}", e)))?; |
| 77 | |
| 78 | Ok(graphs.get(name).cloned()) |
| 79 | } |
| 80 | |
| 81 | /// Check if a graph exists |
| 82 | pub fn has_graph(&self, name: &str) -> bool { |