Add a new node to the nodes vector, returning its index.
(&mut self, node: NodeData)
| 139 | |
| 140 | /// Add a new node to the nodes vector, returning its index. |
| 141 | pub(super) fn push_node(&mut self, node: NodeData) -> NodeId { |
| 142 | let next_index = self.nodes.len(); |
| 143 | self.nodes.push(Node::new(node)); |
| 144 | NodeId::new(next_index) |
| 145 | } |
| 146 | |
| 147 | #[inline] |
| 148 | pub(super) fn push_element_id(&mut self, node: NodeId) { |