pub trait SaturatingAdd: Sized + Add<Self, Output = Self> {
    fn saturating_add(&self, v: &Self) -> Self;
}
Expand description

Performs addition that saturates at the numeric bounds instead of overflowing.

Required Methods§

Saturating addition. Computes self + other, saturating at the relevant high or low boundary of the type.

Implementations on Foreign Types§

Implementors§

impl<Frac> SaturatingAdd for FixedI8<Frac>

impl<Frac> SaturatingAdd for FixedI16<Frac>

impl<Frac> SaturatingAdd for FixedI32<Frac>

impl<Frac> SaturatingAdd for FixedI64<Frac>

impl<Frac> SaturatingAdd for FixedI128<Frac>

impl<Frac> SaturatingAdd for FixedU8<Frac>

impl<Frac> SaturatingAdd for FixedU16<Frac>

impl<Frac> SaturatingAdd for FixedU32<Frac>

impl<Frac> SaturatingAdd for FixedU64<Frac>

impl<Frac> SaturatingAdd for FixedU128<Frac>