Lines Matching refs:ByteCountOutOfBoundsKind
53 None => Err(ByteCountOutOfBounds(ByteCountOutOfBoundsKind::RoundUp)), in new_rounded_up()
64 .map_err(|_| ByteCountOutOfBounds(ByteCountOutOfBoundsKind::ConvertU64))?; in new_rounded_up_u64()
94 .ok_or(ByteCountOutOfBounds(ByteCountOutOfBoundsKind::Add)) in checked_add()
108 .ok_or_else(|| ByteCountOutOfBounds(ByteCountOutOfBoundsKind::Sub)) in checked_sub()
126 .ok_or_else(|| ByteCountOutOfBounds(ByteCountOutOfBoundsKind::Mul)) in checked_mul()
136 .ok_or_else(|| ByteCountOutOfBounds(ByteCountOutOfBoundsKind::Div)) in checked_div()
159 .ok_or_else(|| ByteCountOutOfBounds(ByteCountOutOfBoundsKind::Rem)) in checked_rem()
239 pub struct ByteCountOutOfBounds(ByteCountOutOfBoundsKind);
250 enum ByteCountOutOfBoundsKind { enum
262 impl fmt::Display for ByteCountOutOfBoundsKind { implementation
265 ByteCountOutOfBoundsKind::RoundUp => f.write_str("byte count overflow rounding up"), in fmt()
266 ByteCountOutOfBoundsKind::ConvertU64 => { in fmt()
269 ByteCountOutOfBoundsKind::Add => f.write_str("byte count overflow during addition"), in fmt()
270 ByteCountOutOfBoundsKind::Sub => f.write_str("byte count underflow during subtraction"), in fmt()
271 ByteCountOutOfBoundsKind::Mul => { in fmt()
274 ByteCountOutOfBoundsKind::Div => f.write_str("division by zero"), in fmt()
275 ByteCountOutOfBoundsKind::Rem => f.write_str("remainder by zero"), in fmt()