pub trait OverflowingMul: Sized + Mul<Self, Output = Self> {
    // Required method
    fn overflowing_mul(&self, v: &Self) -> (Self, bool);
}
Expand description

Performs multiplication with a flag for overflow.

Required Methods§

source

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

Returns a tuple of the product along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.

Implementations on Foreign Types§

source§

impl OverflowingMul for isize

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for i16

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for usize

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for u64

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for i64

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for u8

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for u128

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for u32

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for i8

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for i32

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for u16

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

source§

impl OverflowingMul for i128

source§

fn overflowing_mul(&self, v: &Self) -> (Self, bool)

Implementors§