Skip to main content

ConstCheckedMul

Trait ConstCheckedMul 

Source
pub trait ConstCheckedMul: Sized + ConstOverflowingMul {
    // Required method
    fn checked_mul(&self, v: &Self) -> Option<Self>;
}
Expand description

Const-compatible checked multiplication.

Required Methods§

Source

fn checked_mul(&self, v: &Self) -> Option<Self>

Checked multiplication. Returns None if overflow occurred.

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 ConstCheckedMul for u8

Source§

fn checked_mul(&self, v: &Self) -> Option<Self>

Source§

impl ConstCheckedMul for u16

Source§

fn checked_mul(&self, v: &Self) -> Option<Self>

Source§

impl ConstCheckedMul for u32

Source§

fn checked_mul(&self, v: &Self) -> Option<Self>

Source§

impl ConstCheckedMul for u64

Source§

fn checked_mul(&self, v: &Self) -> Option<Self>

Source§

impl ConstCheckedMul for u128

Source§

fn checked_mul(&self, v: &Self) -> Option<Self>

Implementors§

Source§

impl<T: ConstMachineWord + MachineWord, const N: usize> ConstCheckedMul for FixedUInt<T, N>