Trait OverflowingSub
trait OverflowingSub: Sized + Sub<Self, Output = Self>
Performs substraction with a flag for overflow.
Required Methods
fn overflowing_sub(self: &Self, v: &Self) -> (Self, bool)Returns a tuple of the difference along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.
Implementors
impl OverflowingSub for usizeimpl OverflowingSub for i64impl OverflowingSub for u8impl OverflowingSub for u128impl OverflowingSub for isizeimpl OverflowingSub for u16impl OverflowingSub for i8impl OverflowingSub for i128impl OverflowingSub for u32impl OverflowingSub for i16impl OverflowingSub for u64impl OverflowingSub for i32