graph-api-simplegraph 0.2.2

A simple, efficient graph implementation for the graph-api ecosystem with support for indexing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::SimpleGraph;
use graph_api_lib::{Element, Label};
use std::fmt::{Debug, Formatter};

impl<Vertex, Edge> Debug for SimpleGraph<Vertex, Edge>
where
    Vertex: Element,
    Edge: Element,
{
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        let mut debug_struct = f.debug_struct("SimpleGraph");
        debug_struct.field("vertices", &self.vertices.len());
        debug_struct.field("edges", &self.edges.len());
        debug_struct.field("labels", &<Vertex::Label as Label>::variants());
        debug_struct.finish()
    }
}