Function split_point_of

Source
fn split_point_of(
    range: impl OneSidedRange<usize>,
) -> Option<(Direction, usize)>
Expand description

Calculates the direction and split point of a one-sided range.

This is a helper function for split_off and split_off_mut that returns the direction of the split (front or back) as well as the index at which to split. Returns None if the split index would overflow.