gctree 0.35.0

A library for cache-friendly, graph-like, arena-allocated datastructures.
Documentation
//!


#[derive(Debug, Clone, Copy)]
pub struct Edge<I, D> {
    pub src: I,
    pub dst: I,
    pub data: D,
}

impl<I, R> std::fmt::Display for Edge<I, R>
where
    I: std::fmt::Display,
    R: std::fmt::Display,
{
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let Self { src, dst, data } = &self;
        write!(f, "{src}--[{data}]-->{dst}")?;
        Ok(())
    }
}