pub struct RcBitmask { /* private fields */ }Expand description
Compact reference count tracking using a bitmask. Supports up to 64 objects, each with a 1-bit “alive” flag.
Implementations§
Source§impl RcBitmask
impl RcBitmask
Sourcepub fn alive_count(&self) -> u32
pub fn alive_count(&self) -> u32
Count alive slots.
Sourcepub fn dead_count(&self) -> u32
pub fn dead_count(&self) -> u32
Count dead slots.
Sourcepub fn first_dead(&self) -> Option<u32>
pub fn first_dead(&self) -> Option<u32>
Find the first dead slot (for allocation).
Sourcepub fn first_alive(&self) -> Option<u32>
pub fn first_alive(&self) -> Option<u32>
Find the first alive slot.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RcBitmask
impl RefUnwindSafe for RcBitmask
impl Send for RcBitmask
impl Sync for RcBitmask
impl Unpin for RcBitmask
impl UnsafeUnpin for RcBitmask
impl UnwindSafe for RcBitmask
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