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;
fn count_ones(self) -> u32;
fn count_zeros(self) -> u32;
}
Required Associated Constants
source
const BITS_COUNT: usize
source
const BYTES_COUNT: usize
Required Methods
source
fn count_ones(self) -> u32
source