Trait overflower_support::AddSaturate [] [src]

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

Add two values, saturating on overflow

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

Associated Types

The result type of the addition

Required Methods

add two values, saturate on overflow

Implementors