graph_api_simplegraph/graph/
debug.rs

1use crate::SimpleGraph;
2use graph_api_lib::{Element, Label};
3use std::fmt::{Debug, Formatter};
4
5impl<Vertex, Edge> Debug for SimpleGraph<Vertex, Edge>
6where
7    Vertex: Element,
8    Edge: Element,
9{
10    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
11        let mut debug_struct = f.debug_struct("SimpleGraph");
12        debug_struct.field("vertices", &self.vertices.len());
13        debug_struct.field("edges", &self.edges.len());
14        debug_struct.field("labels", &<Vertex::Label as Label>::variants());
15        debug_struct.finish()
16    }
17}