Trait WrappingArithmetic
pub trait WrappingArithmetic: Sized + Sealed {
// Required methods
fn wrapping_add(self, rhs: Self) -> Self;
fn wrapping_sub(self, rhs: Self) -> Self;
fn wrapping_mul(self, rhs: Self) -> Self;
}Expand description
Primitive integer types supported by the wrapping arithmetic wrappers.
Required Methods§
fn wrapping_add(self, rhs: Self) -> Self
fn wrapping_add(self, rhs: Self) -> Self
Returns the wrapping sum of self and rhs.
fn wrapping_sub(self, rhs: Self) -> Self
fn wrapping_sub(self, rhs: Self) -> Self
Returns the wrapping difference of self and rhs.
fn wrapping_mul(self, rhs: Self) -> Self
fn wrapping_mul(self, rhs: Self) -> Self
Returns the wrapping product of self and rhs.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.