Get the next pointer of a leaf node in the arena.
(&self, id: NodeId)
| 242 | |
| 243 | /// Get the next pointer of a leaf node in the arena. |
| 244 | pub fn get_leaf_next(&self, id: NodeId) -> Option<NodeId> { |
| 245 | self.get_leaf(id).and_then(|leaf| { |
| 246 | if leaf.next == NULL_NODE { |
| 247 | None |
| 248 | } else { |
| 249 | Some(leaf.next) |
| 250 | } |
| 251 | }) |
| 252 | } |
| 253 | |
| 254 | /// Get a reference to a branch node in the arena. |
| 255 | #[inline] |