Trait overflower_support::SubWrap [] [src]

pub trait SubWrap<RHS = Self> {
    type Output;
    fn sub_wrap(self, rhs: RHS) -> Self::Output;
}

Subtract two values, wrapping on overflow

This trait does the same as std::ops::Sub for most values. it is specialized for integer types to wrap on over- or underflow.

Associated Types

The result type of the subtraction

Required Methods

subtract two values, wrap on overflow

Implementors