Trait bones_framework::prelude::BitSet
pub trait BitSet {
Show 22 methods
// Required methods
fn bit_len(&self) -> usize;
fn bit_init(&mut self, value: bool) -> &mut Self;
fn bit_test(&self, bit: usize) -> bool;
fn bit_set(&mut self, bit: usize) -> &mut Self;
fn bit_reset(&mut self, bit: usize) -> &mut Self;
fn bit_flip(&mut self, bit: usize) -> &mut Self;
fn bit_cond(&mut self, bit: usize, value: bool) -> &mut Self;
fn bit_all(&self) -> bool;
fn bit_any(&self) -> bool;
fn bit_eq(&self, rhs: &Self) -> bool;
fn bit_disjoint(&self, rhs: &Self) -> bool;
fn bit_subset(&self, rhs: &Self) -> bool;
fn bit_or(&mut self, rhs: &Self) -> &mut Self;
fn bit_and(&mut self, rhs: &Self) -> &mut Self;
fn bit_andnot(&mut self, rhs: &Self) -> &mut Self;
fn bit_xor(&mut self, rhs: &Self) -> &mut Self;
fn bit_not(&mut self) -> &mut Self;
fn bit_mask(&mut self, rhs: &Self, mask: &Self) -> &mut Self;
fn bit_count(&self) -> usize;
// Provided methods
fn bit_fmt(&self) -> &BitFmt<Self> { ... }
fn bit_none(&self) -> bool { ... }
fn bit_superset(&self, rhs: &Self) -> bool { ... }
}
Expand description
The BitSet API.
Required Methods§
fn bit_cond(&mut self, bit: usize, value: bool) -> &mut Self
fn bit_cond(&mut self, bit: usize, value: bool) -> &mut Self
Conditionally sets or resets the given bit.
fn bit_disjoint(&self, rhs: &Self) -> bool
fn bit_disjoint(&self, rhs: &Self) -> bool
Returns if the two bitsets have no bits in common.
fn bit_subset(&self, rhs: &Self) -> bool
fn bit_subset(&self, rhs: &Self) -> bool
Returns if self is a subset of rhs.
fn bit_andnot(&mut self, rhs: &Self) -> &mut Self
fn bit_andnot(&mut self, rhs: &Self) -> &mut Self
Bitwise AND after NOT of rhs.
Provided Methods§
fn bit_superset(&self, rhs: &Self) -> bool
fn bit_superset(&self, rhs: &Self) -> bool
Returns if self is a superset of rhs.
Object Safety§
This trait is not object safe.