Function core::slice::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 take
and take_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.