use crate::intent_graph::{CanonicalLinkType, CanonicalMap, Direction};
#[derive(Debug, Default)]
pub struct CanonicalMapBuilder {
link_type: Option<CanonicalLinkType>,
direction: Option<Direction>,
}
impl CanonicalMapBuilder {
pub fn new() -> Self {
Self::default()
}
pub fn link_type(mut self, lt: CanonicalLinkType) -> Self {
self.link_type = Some(lt);
self
}
pub fn direction(mut self, d: Direction) -> Self {
self.direction = Some(d);
self
}
pub fn build(self) -> CanonicalMap {
CanonicalMap {
link_type: self.link_type,
direction: self.direction,
}
}
}