pub fn checked_range(
    offset: usize,
    len: usize,
    max: usize
) -> Option<Range<usize>>
Expand description

Construct a range from an offset to a data length after the offset. Returns None if the end of the range would exceed some maximum offset.