pub trait CountOnes {
fn count_ones(self) -> u64;
}
Expand description
Returns the number of ones in the binary representation of a number.
Required Methods
fn count_ones(self) -> u64
Implementations on Foreign Types
sourceimpl CountOnes for u8
impl CountOnes for u8
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for u16
impl CountOnes for u16
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for u32
impl CountOnes for u32
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for u64
impl CountOnes for u64
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for u128
impl CountOnes for u128
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for usize
impl CountOnes for usize
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for i8
impl CountOnes for i8
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for i16
impl CountOnes for i16
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for i32
impl CountOnes for i32
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for i64
impl CountOnes for i64
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for i128
impl CountOnes for i128
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.
sourceimpl CountOnes for isize
impl CountOnes for isize
sourcefn count_ones(self) -> u64
fn count_ones(self) -> u64
This is a wrapper over the count_ones
functions in the standard library, for
example this one.