pub trait OverflowingSub: Sized + Sub<Self, Output = Self> {
    fn overflowing_sub(&self, v: &Self) -> (Self, bool);
}
Expand description

Performs substraction with a flag for overflow.

Required Methods§

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.

Implementations on Foreign Types§

Implementors§

impl<Frac> OverflowingSub for FixedI8<Frac>

impl<Frac> OverflowingSub for FixedI16<Frac>

impl<Frac> OverflowingSub for FixedI32<Frac>

impl<Frac> OverflowingSub for FixedI64<Frac>

impl<Frac> OverflowingSub for FixedI128<Frac>

impl<Frac> OverflowingSub for FixedU8<Frac>

impl<Frac> OverflowingSub for FixedU16<Frac>

impl<Frac> OverflowingSub for FixedU32<Frac>

impl<Frac> OverflowingSub for FixedU64<Frac>

impl<Frac> OverflowingSub for FixedU128<Frac>