pub trait MinNumTraits:
Sized
+ Copy
+ TryFrom<u32> {
const ZERO: Self;
// Required methods
fn checked_mul(self, rhs: Self) -> Option<Self>;
fn checked_add(self, rhs: Self) -> Option<Self>;
fn checked_sub(self, v: Self) -> Option<Self>;
// Provided method
fn from_u32(n: u32) -> Option<Self> { ... }
}
Expand description
minimal subset of traits used by to_signed_with_radix
and to_unsigned_with_radix
Required Associated Constants§
Required Methods§
sourcefn checked_mul(self, rhs: Self) -> Option<Self>
fn checked_mul(self, rhs: Self) -> Option<Self>
the checked multiplication operation for this type
sourcefn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add(self, rhs: Self) -> Option<Self>
the chekced addition operation for this type
sourcefn checked_sub(self, v: Self) -> Option<Self>
fn checked_sub(self, v: Self) -> Option<Self>
the checked subtraction operation for this type
Provided Methods§
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.