Skip to main content

LeanMul

Trait LeanMul 

Source
pub trait LeanMul: Sized + Copy {
    // Required method
    fn checked_mul_lean(self, rhs: Self) -> Option<Self>;
}
Expand description

Checked multiplication that routes 64-bit unsigned products through checked_mul_u64 and every other width through the library operator (which needs no helper below 64 bits). Used by the wire integer types, so WireU64::checked_mul and checked_mul_assign never link the helper.

Required Methods§

Source

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

self * rhs, or None on overflow.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LeanMul for i8

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for i16

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for i32

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for i64

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for i128

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for isize

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for u8

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for u16

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for u32

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for u64

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for u128

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Source§

impl LeanMul for usize

Source§

fn checked_mul_lean(self, rhs: Self) -> Option<Self>

Implementors§