source-mesh-core 1.2.0

Rust dependency graph analysis, diagrams, and cycle reports
Documentation
use super::dot::Dot;
use super::graphml::GraphMl;
use super::mermaid::Mermaid;
use super::rendering::exporter::Exporter;

#[derive(Clone, Copy)]
pub enum Format {
    Dot,
    Mermaid,
    Graphml,
}

impl Format {
    #[must_use]
    pub fn exporter(self) -> Box<dyn Exporter> {
        match self {
            Self::Dot => Box::new(Dot),
            Self::Mermaid => Box::new(Mermaid),
            Self::Graphml => Box::new(GraphMl),
        }
    }
}