wolf_graph_mermaid/details/
edge_style.rs

1#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2pub enum EdgeStyle {
3    Normal,
4    Dotted,
5    Thick,
6}
7
8impl EdgeStyle {
9    pub fn start(&self) -> &'static str {
10        match self {
11            EdgeStyle::Normal => "-",
12            EdgeStyle::Dotted => "-",
13            EdgeStyle::Thick => "=",
14        }
15    }
16
17    pub fn body(&self, length: usize) -> String {
18        let c = match self {
19            EdgeStyle::Normal => "-",
20            EdgeStyle::Dotted => ".",
21            EdgeStyle::Thick => "=",
22        };
23        c.repeat(length)
24    }
25
26    pub fn end(&self) -> &'static str {
27        match self {
28            EdgeStyle::Normal => "-",
29            EdgeStyle::Dotted => "-",
30            EdgeStyle::Thick => "=",
31        }
32    }
33}