pub struct BandMut<'a> { /* private fields */ }Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Disjoint mutable handle to one horizontal band inside BandedBuf, passed to the closure
in BandedBuf::with_bands_mut.
BandMut is Send, so &mut [BandMut<'_>] can be mutated in parallel across worker threads
(e.g. via rayon::par_iter_mut) with zero locks or atomic metadata contention. Each band
starts with its previous SampleClaims available via starting_claims;
call commit_claims (or keep_starting_claims)
to record the band’s post-mutation claims. Any band that is not explicitly committed (or that
panics mid-mutation) remains conservatively at SampleClaims::NONE.
Implementations§
Source§impl<'a> BandMut<'a>
impl<'a> BandMut<'a>
Sourcepub const fn start_y(&self) -> u32
pub const fn start_y(&self) -> u32
Global starting row coordinate (y) of this band inside the parent BandedBuf.
Sourcepub const fn starting_claims(&self) -> SampleClaims
pub const fn starting_claims(&self) -> SampleClaims
Attached SampleClaims that held on this band before BandedBuf::with_bands_mut began.
Sourcepub fn as_view(&self) -> PixelView<'_>
pub fn as_view(&self) -> PixelView<'_>
Borrow this band immutably as a PixelView (zero Arc refcount bump).
Sourcepub fn view_mut(&mut self) -> &mut PixelViewMut<'a>
pub fn view_mut(&mut self) -> &mut PixelViewMut<'a>
Mutable PixelViewMut over this band’s pixels.
Sourcepub fn commit_claims(&mut self, claims: SampleClaims)
pub fn commit_claims(&mut self, claims: SampleClaims)
Commit post-mutation SampleClaims for this band.
When BandedBuf::with_bands_mut returns, whole-image BandedBuf::attached_claims is
automatically recomputed as the disjoint-region union across all bands.
Sourcepub fn keep_starting_claims(&mut self)
pub fn keep_starting_claims(&mut self)
Preserve starting_claims for a band whose pixels were left unchanged.