Skip to main content

rudof_rdf/rdf_core/visualizer/style/
thickness_style.rs

1use serde::{Deserialize, Serialize};
2
3/// Represents the available line thickness and style options in PlantUML.
4#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
5pub enum ThicknessStyle {
6    Bold,
7    Normal,
8    Dashed,
9    Dotted,
10}
11
12impl ThicknessStyle {
13    /// Returns the PlantUML-compatible directive for the line style.
14    pub fn as_plantuml(&self) -> &'static str {
15        match self {
16            ThicknessStyle::Bold => "line.bold;",
17            ThicknessStyle::Normal => "",
18            ThicknessStyle::Dashed => "line.dashed;",
19            ThicknessStyle::Dotted => "line.dotted;",
20        }
21    }
22}