pub trait PrimitiveInt:
'static
+ Send
+ Sync
+ Serialize
+ DeserializeOwned
+ AddAssign
+ SubAssign
+ MulAssign
+ Neg<Output = Self>
+ Shr<usize, Output = Self>
+ Eq
+ Into<Self::Larger>
+ TryFrom<Self::Larger>
+ From<i8>
+ TryFrom<i32>
+ TryFrom<i128>
+ Into<i128>
+ Copy
+ Div<Self, Output = Self>
+ Rem<Self, Output = Self>
+ Display {
type Larger: PrimitiveInt;
// Required methods
fn bits() -> usize;
fn overflowing_mul(self, rhs: Self) -> Self;
fn overflowing_sub(self, rhs: Self) -> Self;
}
Expand description
Trait for i8
to i128
.
Required Associated Types§
Sourcetype Larger: PrimitiveInt
type Larger: PrimitiveInt
The primitive integer that is “twice as large” as this one.
The only exception is i128
, for which there is no larger primitive integer.
Required Methods§
Sourcefn overflowing_mul(self, rhs: Self) -> Self
fn overflowing_mul(self, rhs: Self) -> Self
The functions i8::overflowing_mul()
to i128::overflowing_mul()
.
Sourcefn overflowing_sub(self, rhs: Self) -> Self
fn overflowing_sub(self, rhs: Self) -> Self
The functions i8::overflowing_sub()
to i128::overflowing_sub()
.
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.