use super::types::ArrowStyle;
#[derive(Clone, Debug)]
pub struct DiagramEdge {
pub from: String,
pub to: String,
pub label: Option<String>,
pub style: ArrowStyle,
}
impl DiagramEdge {
pub fn new(from: impl Into<String>, to: impl Into<String>) -> Self {
Self {
from: from.into(),
to: to.into(),
label: None,
style: ArrowStyle::default(),
}
}
pub fn label(mut self, label: impl Into<String>) -> Self {
self.label = Some(label.into());
self
}
pub fn style(mut self, style: ArrowStyle) -> Self {
self.style = style;
self
}
}