pub trait CountOnes {
    // Required method
    fn count_ones(self) -> u64;
}
Expand description

Returns the number of ones in the binary representation of a number.

Required Methods§

source

fn count_ones(self) -> u64

Implementations on Foreign Types§

source§

impl CountOnes for i8

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for i16

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for i32

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for i64

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for i128

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for isize

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for u8

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for u16

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for u32

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for u64

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for u128

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

source§

impl CountOnes for usize

source§

fn count_ones(self) -> u64

This is a wrapper over the count_ones functions in the standard library, for example this one.

Implementors§