(bound: &FrameBound, pos: usize, len: usize, _is_start: bool)
| 69 | } |
| 70 | |
| 71 | fn rows_bound_to_idx(bound: &FrameBound, pos: usize, len: usize, _is_start: bool) -> usize { |
| 72 | match bound { |
| 73 | FrameBound::UnboundedPreceding => 0, |
| 74 | FrameBound::Preceding(n) => pos.saturating_sub(*n as usize), |
| 75 | FrameBound::CurrentRow => pos, |
| 76 | FrameBound::Following(n) => (pos + *n as usize).min(len.saturating_sub(1)), |
| 77 | FrameBound::UnboundedFollowing => len.saturating_sub(1), |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | // ── RANGE ───────────────────────────────────────────────────────────────────── |
| 82 |