pub trait Bitmap: for<'a> WithBitmapSlice<'a> {
    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

Mark the memory range specified by the given offset and len as dirtied.

Check whether the specified offset is marked as dirty.

Return a <Self as WithBitmapSlice>::S slice of the current bitmap, starting at the specified offset.

Implementations on Foreign Types

Implementors