CheckedMul

Trait CheckedMul 

Source
pub trait CheckedMul<Rhs = Self>
where Self: Sized,
{ type Output; type Error; // Required method fn checked_mul(self, scalar: Rhs) -> Result<Self::Output, Self::Error>; }

Required Associated Types§

Required Methods§

Source

fn checked_mul(self, scalar: Rhs) -> Result<Self::Output, Self::Error>

Checked arithmetic multiplication with self

§Errors

When the result of the multiplication can not be represented (e.g. due to an overflow).

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 f32

Source§

type Output = f32

Source§

type Error = MulError<f32, f32>

Source§

fn checked_mul(self, rhs: Self) -> Result<Self::Output, Self::Error>

Source§

impl CheckedMul for f64

Source§

type Output = f64

Source§

type Error = MulError<f64, f64>

Source§

fn checked_mul(self, rhs: Self) -> Result<Self::Output, Self::Error>

Source§

impl CheckedMul for i64

Source§

type Output = i64

Source§

type Error = MulError<i64, i64>

Source§

fn checked_mul(self, rhs: Self) -> Result<Self::Output, Self::Error>

Source§

impl CheckedMul for u32

Source§

type Output = u32

Source§

type Error = MulError<u32, u32>

Source§

fn checked_mul(self, rhs: Self) -> Result<Self::Output, Self::Error>

Source§

impl CheckedMul for u64

Source§

type Output = u64

Source§

type Error = MulError<u64, u64>

Source§

fn checked_mul(self, rhs: Self) -> Result<Self::Output, Self::Error>

Implementors§