pub struct bitmap_t { /* private fields */ }
Implementations§
Source§impl bitmap_t
impl bitmap_t
pub fn new(bits: i32) -> Self
Sourcepub fn get_u64_by_index(&mut self, idx: usize) -> (&mut u64, u64)
pub fn get_u64_by_index(&mut self, idx: usize) -> (&mut u64, u64)
给定位域索引值,返回指定的u64指针以及bit位域
Sourcepub fn set_bitmap(&mut self, idx: i32) -> RESULT
pub fn set_bitmap(&mut self, idx: i32) -> RESULT
设置一个bitmap位,从0开始
Sourcepub fn unset_bitmap(&mut self, idx: i32) -> RESULT
pub fn unset_bitmap(&mut self, idx: i32) -> RESULT
设置一个bitmap位,从0开始
Sourcepub fn clear_bitmap(&mut self) -> RESULT
pub fn clear_bitmap(&mut self) -> RESULT
设置一个bitmap位,从0开始
pub fn is_bit_set(&mut self, idx: i32) -> bool
pub fn get_used_count(&self) -> usize
pub fn to_string(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for bitmap_t
impl RefUnwindSafe for bitmap_t
impl !Send for bitmap_t
impl !Sync for bitmap_t
impl Unpin for bitmap_t
impl UnwindSafe for bitmap_t
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