CheckedMul

Trait CheckedMul 

Source
pub trait CheckedMul
where Self: Sized,
{ // Required method fn checked_multiply(&self, rhs: Self) -> Option<usize>; }
Expand description

CheckedMul is a trait to capture the built-in checked_mul behavior provided for all intrinsic integer types in Rust, casting to usize. This is intended for computing matrix bounds for storage in a contiguous vector, whose upper-bound size is limited by usize.

Required Methods§

Source

fn checked_multiply(&self, rhs: Self) -> Option<usize>

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 CheckedMul for char

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for i8

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for i16

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for i32

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for i64

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for u8

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for u16

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for u32

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Source§

impl CheckedMul for u64

Source§

fn checked_multiply(&self, rhs: Self) -> Option<usize>

Implementors§