Trait plank_ecs::BitSet[]

pub trait BitSet {
    pub fn bit_len(&self) -> usize;
pub fn bit_init(&mut self, value: bool) -> &mut Self;
pub fn bit_test(&self, bit: usize) -> bool;
pub fn bit_set(&mut self, bit: usize) -> &mut Self;
pub fn bit_reset(&mut self, bit: usize) -> &mut Self;
pub fn bit_flip(&mut self, bit: usize) -> &mut Self;
pub fn bit_cond(&mut self, bit: usize, value: bool) -> &mut Self;
pub fn bit_all(&self) -> bool;
pub fn bit_any(&self) -> bool;
pub fn bit_eq(&self, rhs: &Self) -> bool;
pub fn bit_disjoint(&self, rhs: &Self) -> bool;
pub fn bit_subset(&self, rhs: &Self) -> bool;
pub fn bit_or(&mut self, rhs: &Self) -> &mut Self;
pub fn bit_and(&mut self, rhs: &Self) -> &mut Self;
pub fn bit_andnot(&mut self, rhs: &Self) -> &mut Self;
pub fn bit_xor(&mut self, rhs: &Self) -> &mut Self;
pub fn bit_not(&mut self) -> &mut Self;
pub fn bit_mask(&mut self, rhs: &Self, mask: &Self) -> &mut Self;
pub fn bit_count(&self) -> usize; pub fn bit_fmt(&self) -> &BitFmt<Self> { ... }
pub fn bit_none(&self) -> bool { ... }
pub fn bit_superset(&self, rhs: &Self) -> bool { ... } }

The BitSet API.

Required methods

pub fn bit_len(&self) -> usize

Returns total number of bits.

pub fn bit_init(&mut self, value: bool) -> &mut Self

Initializes all bits.

pub fn bit_test(&self, bit: usize) -> bool

Returns if the given bit is set.

pub fn bit_set(&mut self, bit: usize) -> &mut Self

Sets the given bit.

pub fn bit_reset(&mut self, bit: usize) -> &mut Self

Resets the given bit.

pub fn bit_flip(&mut self, bit: usize) -> &mut Self

Flips the given bit.

pub fn bit_cond(&mut self, bit: usize, value: bool) -> &mut Self

Conditionally sets or resets the given bit.

pub fn bit_all(&self) -> bool

Returns if all bits are set.

pub fn bit_any(&self) -> bool

Returns if any bits are set.

pub fn bit_eq(&self, rhs: &Self) -> bool

Returns if the two bitsets are equal.

pub fn bit_disjoint(&self, rhs: &Self) -> bool

Returns if the two bitsets have no bits in common.

pub fn bit_subset(&self, rhs: &Self) -> bool

Returns if self is a subset of rhs.

pub fn bit_or(&mut self, rhs: &Self) -> &mut Self

Bitwise OR.

pub fn bit_and(&mut self, rhs: &Self) -> &mut Self

Bitwise AND.

pub fn bit_andnot(&mut self, rhs: &Self) -> &mut Self

Bitwise AND after NOT of rhs.

pub fn bit_xor(&mut self, rhs: &Self) -> &mut Self

Bitwise XOR.

pub fn bit_not(&mut self) -> &mut Self

Bitwise NOT.

pub fn bit_mask(&mut self, rhs: &Self, mask: &Self) -> &mut Self

Bitwise combine with MASK.

pub fn bit_count(&self) -> usize

Counts the number of set bits.

Loading content...

Provided methods

pub fn bit_fmt(&self) -> &BitFmt<Self>

Format the bits.

pub fn bit_none(&self) -> bool

Returns if none of the bits are set.

pub fn bit_superset(&self, rhs: &Self) -> bool

Returns if self is a superset of rhs.

Loading content...

Implementations on Foreign Types

impl BitSet for u8

impl BitSet for [[u64; 4]]

impl BitSet for [u128]

impl BitSet for [[u64; 2]]

impl BitSet for u64

impl BitSet for u16

impl BitSet for u32

impl BitSet for [[u16; 8]]

impl BitSet for [[u8; 16]]

impl BitSet for [[u16; 16]]

impl BitSet for [u64]

impl BitSet for [[u32; 4]]

impl BitSet for [u8]

impl BitSet for [[u32; 8]]

impl BitSet for u128

impl BitSet for [[u8; 32]]

impl BitSet for [u16]

impl<T> BitSet for Box<[T], Global> where
    [T]: BitSet

impl<T> BitSet for Vec<T, Global> where
    [T]: BitSet

impl BitSet for [u32]

Loading content...

Implementors

Loading content...