[][src]Trait isomorphism::bitfield::BitField

pub trait BitField: BitAnd<Output = Self> + BitOr<Output = Self> + Copy + Sized {
    type Iter: Iterator<Item = usize>;
    fn size() -> usize;
fn one_at(index: usize) -> Self;
fn zero_at(index: usize) -> Self;
fn iter(&self) -> Self::Iter;
fn full(&self) -> bool; }

A bit field trait for use in hashmap buckets. See the bitfield method of BiMapBuilder for more information.

Associated Types

type Iter: Iterator<Item = usize>

See the documentation for the iter function.

Loading content...

Required methods

fn size() -> usize

Should return a constant value describing how big the bitfield of this type is.

fn one_at(index: usize) -> Self

Should return a bitfield that is all zeroes, except for a single one at a given index.

fn zero_at(index: usize) -> Self

Should return a bitfield that is all ones, except for a single zero at a given index.

fn iter(&self) -> Self::Iter

Return an iterator that iterates through the bitfield, returning the indexes within the bitfield that have 1s in them, in order from least significant to most significant.

fn full(&self) -> bool

Is the bitfield currently full?

Loading content...

Implementors

impl<T> BitField for T where
    T: BitSized + BitAnd<Output = T> + BitOr<Output = T> + Eq + Not<Output = T> + Shl<usize, Output = T> + Shr<usize, Output = T> + From<u8> + Copy
[src]

type Iter = BitFieldIterator<T>

Loading content...