pub trait WrappingMul: Sized + Mul<Output = Self> {
// Required method
fn wrapping_mul(&self, v: &Self) -> Self;
}
Expand description
Performs multiplication that wraps around on overflow.
Required Methods§
Sourcefn wrapping_mul(&self, v: &Self) -> Self
fn wrapping_mul(&self, v: &Self) -> Self
Wrapping (modular) multiplication. Computes self * other
, wrapping around at the boundary
of the type.
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.
Implementations on Foreign Types§
Source§impl WrappingMul for i8
impl WrappingMul for i8
fn wrapping_mul(&self, v: &i8) -> i8
Source§impl WrappingMul for i16
impl WrappingMul for i16
fn wrapping_mul(&self, v: &i16) -> i16
Source§impl WrappingMul for i32
impl WrappingMul for i32
fn wrapping_mul(&self, v: &i32) -> i32
Source§impl WrappingMul for i64
impl WrappingMul for i64
fn wrapping_mul(&self, v: &i64) -> i64
Source§impl WrappingMul for i128
impl WrappingMul for i128
fn wrapping_mul(&self, v: &i128) -> i128
Source§impl WrappingMul for isize
impl WrappingMul for isize
fn wrapping_mul(&self, v: &isize) -> isize
Source§impl WrappingMul for u8
impl WrappingMul for u8
fn wrapping_mul(&self, v: &u8) -> u8
Source§impl WrappingMul for u16
impl WrappingMul for u16
fn wrapping_mul(&self, v: &u16) -> u16
Source§impl WrappingMul for u32
impl WrappingMul for u32
fn wrapping_mul(&self, v: &u32) -> u32
Source§impl WrappingMul for u64
impl WrappingMul for u64
fn wrapping_mul(&self, v: &u64) -> u64
Source§impl WrappingMul for u128
impl WrappingMul for u128
fn wrapping_mul(&self, v: &u128) -> u128
Source§impl WrappingMul for usize
impl WrappingMul for usize
fn wrapping_mul(&self, v: &usize) -> usize
Source§impl<T> WrappingMul for Wrapping<T>
impl<T> WrappingMul for Wrapping<T>
fn wrapping_mul(&self, v: &Wrapping<T>) -> Wrapping<T>
Implementors§
impl WrappingMul for BoxedUint
Available on crate feature
alloc
only.