pub trait Integer<T>: ArithmeticOps<T> {
// Required methods
fn leading_zeros(self) -> T;
fn trailing_zeros(self) -> T;
fn count_ones(self) -> T;
fn rotl(self, other: T) -> T;
fn rotr(self, other: T) -> T;
fn rem(self, other: T) -> Result<T, TrapCode>;
}Expand description
Integer value.
Required Methods§
Sourcefn leading_zeros(self) -> T
fn leading_zeros(self) -> T
Counts leading zeros in the bitwise representation of the value.
Sourcefn trailing_zeros(self) -> T
fn trailing_zeros(self) -> T
Counts trailing zeros in the bitwise representation of the value.
Sourcefn count_ones(self) -> T
fn count_ones(self) -> T
Counts 1-bits in the bitwise representation of the value.
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.