#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum EdgeStyle {
Normal,
Dotted,
Thick,
}
impl EdgeStyle {
pub fn start(&self) -> &'static str {
match self {
EdgeStyle::Normal => "-",
EdgeStyle::Dotted => "-",
EdgeStyle::Thick => "=",
}
}
pub fn body(&self, length: usize) -> String {
let c = match self {
EdgeStyle::Normal => "-",
EdgeStyle::Dotted => ".",
EdgeStyle::Thick => "=",
};
c.repeat(length)
}
pub fn end(&self) -> &'static str {
match self {
EdgeStyle::Normal => "-",
EdgeStyle::Dotted => "-",
EdgeStyle::Thick => "=",
}
}
}