Skip to main content

parent_of

Function parent_of 

Source
pub fn parent_of(rows: &[Row], index: usize) -> Option<usize>
Expand description

The row index hangs under: the nearest row above it with a smaller depth.

Nearest, not previous — the row directly above is usually a sibling, and often the last leaf of a sibling’s whole subtree. Walking up until the depth actually drops is what skips all of that.