pub trait Bitmap: for<'a> WithBitmapSlice<'a> {
// Required methods
fn mark_dirty(&self, offset: usize, len: usize);
fn dirty_at(&self, offset: usize) -> bool;
fn slice_at(&self, offset: usize) -> <Self as WithBitmapSlice<'_>>::S;
}Expand description
Common bitmap operations. Using Higher-Rank Trait Bounds (HRTBs) to effectively define
an associated type that has a lifetime parameter, without tagging the Bitmap trait with
a lifetime as well.
Using an associated type allows implementing the Bitmap and BitmapSlice functionality
as a zero-cost abstraction when providing trivial implementations such as the one
defined for ().
Required Methods§
Sourcefn mark_dirty(&self, offset: usize, len: usize)
fn mark_dirty(&self, offset: usize, len: usize)
Mark the memory range specified by the given offset and len as dirtied.
Sourcefn dirty_at(&self, offset: usize) -> bool
fn dirty_at(&self, offset: usize) -> bool
Check whether the specified offset is marked as dirty.
Sourcefn slice_at(&self, offset: usize) -> <Self as WithBitmapSlice<'_>>::S
fn slice_at(&self, offset: usize) -> <Self as WithBitmapSlice<'_>>::S
Return a <Self as WithBitmapSlice>::S slice of the current bitmap, starting at
the specified offset.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Implementors§
impl Bitmap for AtomicBitmap
Available on crate feature
backend-bitmap only.