Trait OverflowingMul

Source
pub trait OverflowingMul<RHS = Self> {
    type Output;

    // Required method
    fn overflowing_mul(self, other: RHS) -> (Self::Output, bool);
}
Expand description

Multiplies two numbers.

Returns a tuple of the sum along with a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped number is returned.

Required Associated Types§

Required Methods§

Source

fn overflowing_mul(self, other: RHS) -> (Self::Output, bool)

Implementations on Foreign Types§

Source§

impl OverflowingMul for i8

Source§

fn overflowing_mul(self, other: i8) -> (i8, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = i8

Source§

impl OverflowingMul for i16

Source§

fn overflowing_mul(self, other: i16) -> (i16, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = i16

Source§

impl OverflowingMul for i32

Source§

fn overflowing_mul(self, other: i32) -> (i32, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = i32

Source§

impl OverflowingMul for i64

Source§

fn overflowing_mul(self, other: i64) -> (i64, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = i64

Source§

impl OverflowingMul for i128

Source§

fn overflowing_mul(self, other: i128) -> (i128, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = i128

Source§

impl OverflowingMul for isize

Source§

fn overflowing_mul(self, other: isize) -> (isize, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = isize

Source§

impl OverflowingMul for u8

Source§

fn overflowing_mul(self, other: u8) -> (u8, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = u8

Source§

impl OverflowingMul for u16

Source§

fn overflowing_mul(self, other: u16) -> (u16, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = u16

Source§

impl OverflowingMul for u32

Source§

fn overflowing_mul(self, other: u32) -> (u32, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = u32

Source§

impl OverflowingMul for u64

Source§

fn overflowing_mul(self, other: u64) -> (u64, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = u64

Source§

impl OverflowingMul for u128

Source§

fn overflowing_mul(self, other: u128) -> (u128, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = u128

Source§

impl OverflowingMul for usize

Source§

fn overflowing_mul(self, other: usize) -> (usize, bool)

This is a wrapper over the overflowing_mul functions in the standard library, for example this one.

Source§

type Output = usize

Implementors§