pub trait Number:
Copy
+ Add<Self, Output = Self>
+ Sub<Self, Output = Self>
+ Shl<usize, Output = Self>
+ Shr<usize, Output = Self>
+ Not<Output = Self>
+ BitAnd<Self, Output = Self>
+ BitOr<Self, Output = Self>
+ Eq
+ Ord
+ Binary {
const BITS_COUNT: usize;
const BYTES_COUNT: usize;
const ONE: Self;
const ZERO: Self;
const MAX: Self;
const MIN: Self;
const BYTE_MASK: Self;
// Required methods
fn count_ones(self) -> u32;
fn count_zeros(self) -> u32;
}Required Associated Constants§
const BITS_COUNT: usize
const BYTES_COUNT: usize
const ONE: Self
const ZERO: Self
const MAX: Self
const MIN: Self
const BYTE_MASK: Self
Required Methods§
fn count_ones(self) -> u32
fn count_zeros(self) -> u32
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.