Divide an aligned byte count by another aligned byte count, producing a scalar value. Returns an error in case the divisor is zero.
(self, divisor: HostAlignedByteCount)
| 131 | /// |
| 132 | /// Returns an error in case the divisor is zero. |
| 133 | pub fn checked_div(self, divisor: HostAlignedByteCount) -> Result<usize, ByteCountOutOfBounds> { |
| 134 | self.0 |
| 135 | .checked_div(divisor.0) |
| 136 | .ok_or_else(|| ByteCountOutOfBounds(ByteCountOutOfBoundsKind::Div)) |
| 137 | } |
| 138 | |
| 139 | /// Compute the remainder of an aligned byte count divided by another |
| 140 | /// aligned byte count. |