Trait overflower_support::SubSaturate [] [src]

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

Subtract two values, saturating on overflow

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

Associated Types

The result type of the subtraction

Required Methods

subtract two values, saturate on overflow

Implementors