Get all edges with a specific label
(&self, label: &str)
| 209 | |
| 210 | /// Get all edges with a specific label |
| 211 | pub fn get_edges_by_label(&self, label: &str) -> Vec<&Edge> { |
| 212 | self.edge_labels |
| 213 | .get(label) |
| 214 | .map(|ids| ids.iter().filter_map(|id| self.edges.get(id)).collect()) |
| 215 | .unwrap_or_default() |
| 216 | } |
| 217 | |
| 218 | /// Get all outgoing edges from a node |
| 219 | pub fn get_outgoing_edges(&self, node_id: &str) -> Vec<&Edge> { |