pub fn resolve_range(range: impl RangeBounds<usize>, len: usize) -> Range<usize>
Resolves a RangeBounds into a range in the range 0..len.
RangeBounds