pub struct IndexedBitField<T: PrimInt> { /* private fields */ }
Implementations§
Source§impl<T: PrimInt> IndexedBitField<T>
impl<T: PrimInt> IndexedBitField<T>
pub const MAX_SIZE: BitFieldSize = BitField<T>::SIZE
pub fn full() -> Self
pub fn empty() -> Self
pub fn full_of(size: BitFieldSize) -> Self
pub fn empty_of(size: BitFieldSize) -> Self
pub fn into_inner(self) -> (BitFieldSize, BitField<T>)
pub fn bits(self) -> BitField<T>
pub fn size(self) -> BitFieldSize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn restore_full(&mut self)
pub fn resize(&mut self, new_size: BitFieldSize)
pub fn resize_checked(&mut self, new_size: BitFieldSize) -> bool
pub fn nb_elements(&self) -> usize
pub fn set_bit(&mut self, bit_idx: BitFieldIndex) -> bool
pub fn unset_bit(&mut self, bit_idx: BitFieldIndex) -> bool
pub fn merge(&mut self, other: &Self) -> bool
pub fn largest(&self) -> Option<BitFieldIndex>
pub fn pop_largest(&mut self) -> Option<BitFieldIndex>
pub fn smallest(&self) -> Option<BitFieldIndex>
pub fn pop_smallest(&mut self) -> Option<BitFieldIndex>
pub fn nth_smallest(&self, n: usize) -> Option<BitFieldIndex>
pub fn pop_nth_smallest(&mut self, n: usize) -> Option<BitFieldIndex>
pub fn nth_largest(&self, n: usize) -> Option<BitFieldIndex>
pub fn pop_nth_largest(&mut self, n: usize) -> Option<BitFieldIndex>
pub fn poll(&self, bit_idx: BitFieldIndex) -> bool
pub fn full_of_checked(size: BitFieldSize) -> Option<Self>
pub fn empty_of_checked(size: BitFieldSize) -> Option<Self>
pub fn set_bit_checked(&mut self, bit_idx: BitFieldIndex) -> Option<bool>
pub fn unset_bit_checked(&mut self, bit_idx: BitFieldIndex) -> Option<bool>
Trait Implementations§
Source§impl<T: Clone + PrimInt> Clone for IndexedBitField<T>
impl<T: Clone + PrimInt> Clone for IndexedBitField<T>
Source§fn clone(&self) -> IndexedBitField<T>
fn clone(&self) -> IndexedBitField<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<T: Copy + PrimInt> Copy for IndexedBitField<T>
impl<T: Eq + PrimInt> Eq for IndexedBitField<T>
impl<T: PrimInt> StructuralPartialEq for IndexedBitField<T>
Auto Trait Implementations§
impl<T> Freeze for IndexedBitField<T>where
T: Freeze,
impl<T> RefUnwindSafe for IndexedBitField<T>where
T: RefUnwindSafe,
impl<T> Send for IndexedBitField<T>where
T: Send,
impl<T> Sync for IndexedBitField<T>where
T: Sync,
impl<T> Unpin for IndexedBitField<T>where
T: Unpin,
impl<T> UnwindSafe for IndexedBitField<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more