Trait num_traits::ops::wrapping::WrappingAdd
source · pub trait WrappingAdd: Sized + Add<Self, Output = Self> {
// Required method
fn wrapping_add(&self, v: &Self) -> Self;
}
Expand description
Performs addition that wraps around on overflow.
Required Methods§
sourcefn wrapping_add(&self, v: &Self) -> Self
fn wrapping_add(&self, v: &Self) -> Self
Wrapping (modular) addition. Computes self + other
, wrapping around at the boundary of
the type.
Object Safety§
This trait is not object safe.