Trait rotary::bit_set::Bits[][src]

pub trait Bits: Sized + Copy {
    type Iter: Iterator<Item = usize>;

    const EMPTY: Self;
    const FULL: Self;

    fn test(&self, index: usize) -> bool;
fn set(&mut self, index: usize);
fn clear(&mut self, index: usize);
fn iter(self) -> Self::Iter; }

The trait for a bit pattern.

Associated Types

type Iter: Iterator<Item = usize>[src]

The iterator over this bit pattern.

See BitSet::iter.

Loading content...

Associated Constants

const EMPTY: Self[src]

Bit-pattern for an empty bit pattern.

See BitSet::empty.

const FULL: Self[src]

Bit-pattern for a full bit pattern.

See BitSet::full.

Loading content...

Required methods

fn test(&self, index: usize) -> bool[src]

Test if the given bit is set.

See BitSet::test.

fn set(&mut self, index: usize)[src]

Set the given bit in the bit pattern.

See BitSet::set.

fn clear(&mut self, index: usize)[src]

Clear the given bit in the bit pattern.

See BitSet::clear.

fn iter(self) -> Self::Iter[src]

Construct an iterator over a bit pattern.

See BitSet::iter.

Loading content...

Implementations on Foreign Types

impl Bits for u128[src]

type Iter = Iter<Self>

impl Bits for u64[src]

type Iter = Iter<Self>

impl Bits for u32[src]

type Iter = Iter<Self>

impl Bits for u16[src]

type Iter = Iter<Self>

impl Bits for u8[src]

type Iter = Iter<Self>

impl<T, const N: usize> Bits for [T; N] where
    T: Bits + Number
[src]

type Iter = ArrayIter<T, N>

Loading content...

Implementors

Loading content...