pub trait CheckedMul<Rhs = Self>: Sized {
type Output;
// Required method
fn checked_mul(self, v: Rhs) -> Option<Self::Output>;
}Expand description
Performs multiplication, returning None if overflow occurred.
Required Associated Types§
Required Methods§
Sourcefn checked_mul(self, v: Rhs) -> Option<Self::Output>
fn checked_mul(self, v: Rhs) -> Option<Self::Output>
Multiplies two numbers, checking for overflow. If overflow happens,
None is returned.
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.