pub trait Integer:
Copy
+ Clone
+ FromStr
+ Debug
+ Ord
+ Eq
+ Zero
+ One
+ AsPrimitive<u32>
+ WrappingAdd
+ WrappingSub
+ WrappingMul
+ WrappingNeg
+ WrappingShl
+ WrappingShr
+ BitAnd<Self, Output = Self>
+ BitOr<Self, Output = Self>
+ BitXor<Self, Output = Self>
+ Div<Self, Output = Self>
+ Rem<Self, Output = Self>
+ Not<Output = Self>
+ From<bool> {
// Required methods
fn wrapping_pow(self, exp: u32) -> Self;
fn count_ones(self) -> Self;
fn count_zeros(self) -> Self;
fn leading_zeros(self) -> Self;
fn trailing_zeros(self) -> Self;
fn abs(self) -> Self;
fn abs_diff(self, other: Self) -> Self;
fn rotate_left(self, n: u32) -> Self;
fn rotate_right(self, n: u32) -> Self;
}
Expand description
Definition of who can be used as a numerical value Currently the immediately available types are primitive integer type (u8, u16, u32, u64, usize, i8, i16, i32, i64, isize)
Required Methods§
fn wrapping_pow(self, exp: u32) -> Self
fn count_ones(self) -> Self
fn count_zeros(self) -> Self
fn leading_zeros(self) -> Self
fn trailing_zeros(self) -> Self
fn abs(self) -> Self
fn abs_diff(self, other: Self) -> Self
fn rotate_left(self, n: u32) -> Self
fn rotate_right(self, n: u32) -> Self
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.