pub fn new(diagram: &'a str) -> Self {
        Self {
            // The diagram and the iterator over the diagram.
            diagram,
            iter: diagram.char_indices().peekable(),

            // The final CD and its edges.
            cd: Cd::new(),
            edge_queue: VecDeque::new(),

            // The previous and next node to be built.
            prev_node: None,
            next_edge: None,
        }
    }
/// Initializes a new CD builder from a string.
Initializes a new CD builder from a string.
Initializes a new CD builder from a string .
pub fn new(diagram: &'a str) -> Self {
        Self {
            // The diagram and the iterator over the diagram.
            diagram,
            iter: diagram.char_indices().peekable(),
            // The final CD and its edges.
            cd: Cd::new(),
            edge_queue: VecDeque::new(),
            // The previous and next node to be built.
            prev_node: None,
            next_edge: None,
        }
    }
pub fn new ( diagram : & ' a str ) -> Self { Self { // The diagram and the iterator over the diagram. diagram , iter : diagram . char_indices ( ) . peekable ( ) , // The final CD and its edges. cd : Cd :: new ( ) , edge_queue : VecDeque :: new ( ) , // The previous and next node to be built. prev_node : None , next_edge : None , } }
Initializes a new CD builder from a string.
Initializes a new CD builder from a string .
diagram
&'a str
diagram
&'a str