Trait EnumBit

Source
pub trait EnumBit {
    // Required methods
    fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>;
    fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>;
}
Expand description

bit_onesbit_zerosを提供する。

Required Methods§

Source

fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>

ビットが1である桁を昇順に列挙する。

Source

fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>

ビットが0である桁を昇順に列挙する。

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.

Implementations on Foreign Types§

Source§

impl EnumBit for u8

Source§

fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>

Source§

fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>

Source§

impl EnumBit for u16

Source§

fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>

Source§

fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>

Source§

impl EnumBit for u32

Source§

fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>

Source§

fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>

Source§

impl EnumBit for u64

Source§

fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>

Source§

fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>

Source§

impl EnumBit for u128

Source§

fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>

Source§

fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>

Source§

impl EnumBit for usize

Source§

fn bit_ones(self, n: usize) -> impl Iterator<Item = usize>

Source§

fn bit_zeros(self, n: usize) -> impl Iterator<Item = usize>

Implementors§