pub fn ensure_in_bounds(offset: u64, len: u64, total: u64) -> Result<()>
Expand description
Ensure the requested [offset, offset+len) range is within [0, total).
Returns Ok(())
if valid; otherwise an OutOfBounds
error.
ยงErrors
Returns MmapIoError::OutOfBounds
if the range exceeds bounds.