Trait CountOnes

Source
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§