Skip to main content

source_mesh_core/export/
format.rs

1use super::dot::Dot;
2use super::exporter::Exporter;
3use super::graphml::GraphMl;
4use super::mermaid::Mermaid;
5
6#[derive(Clone, Copy)]
7pub enum Format {
8    Dot,
9    Mermaid,
10    Graphml,
11}
12
13impl Format {
14    #[must_use]
15    pub fn exporter(self) -> Box<dyn Exporter> {
16        match self {
17            Self::Dot => Box::new(Dot),
18            Self::Mermaid => Box::new(Mermaid),
19            Self::Graphml => Box::new(GraphMl),
20        }
21    }
22}