[][src]Trait nitric_component::bit_set::BitSet

pub unsafe trait BitSet: Sized + Default {
    fn add(&mut self, bit: usize) -> bool;
fn remove(&mut self, bit: usize) -> bool;
fn pop_front(&mut self) -> Option<usize>;
fn contains(&self, bit: usize) -> bool;
fn count(&self) -> usize; fn empty_bit_set() -> Self { ... } }

BitSet trait which may or may not be hierarchical. This structure is used as storage mask to determine if components exist for certain IDs.

Required Methods

Adds a bit to the bit set, returning the previous value.

Does nothing (and returns true) if the bit was set already.

Removes a bit from the bit set, returning the previous value.

Does nothing (and returns false) if the bit was zero already.

Removes the first bit set to 1 and returns its position. Returns None if the bit set is empty.

Checks if bit is set.

Count the number of set bits.

Provided Methods

Creates a BitSet with no bits set.

Implementors

impl BitSet for FlatBitSet
[src]