#[non_exhaustive]pub enum BandSizing {
MaxBandBytes(usize),
RowsPerBand(u32),
}Expand description
How BandedBuf partitions image rows into horizontal bands.
Replaces bare usize parameters so byte budgets (MaxBandBytes) and row counts
(RowsPerBand) can never be confused at the call site.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MaxBandBytes(usize)
Target per-band memory cap in bytes (deriving rows_per_band = (bytes / stride).max(1).min(height)).
Rejects 0 with BufferError::InvalidDimensions.
RowsPerBand(u32)
Explicit row count per band (last band may be shorter; clamped to height).
Rejects 0 with BufferError::InvalidDimensions.
Implementations§
Source§impl BandSizing
impl BandSizing
Sourcepub const DEFAULT: BandSizing
pub const DEFAULT: BandSizing
Default band sizing: MaxBandBytes(DEFAULT_MAX_BAND_BYTES) (16 MiB).
Trait Implementations§
Source§impl Clone for BandSizing
impl Clone for BandSizing
Source§fn clone(&self) -> BandSizing
fn clone(&self) -> BandSizing
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BandSizing
Source§impl Debug for BandSizing
impl Debug for BandSizing
Source§impl Default for BandSizing
impl Default for BandSizing
Source§fn default() -> BandSizing
fn default() -> BandSizing
Returns the “default value” for a type. Read more
impl Eq for BandSizing
Source§impl Hash for BandSizing
impl Hash for BandSizing
Source§impl PartialEq for BandSizing
impl PartialEq for BandSizing
impl StructuralPartialEq for BandSizing
Auto Trait Implementations§
impl Freeze for BandSizing
impl RefUnwindSafe for BandSizing
impl Send for BandSizing
impl Sync for BandSizing
impl Unpin for BandSizing
impl UnsafeUnpin for BandSizing
impl UnwindSafe for BandSizing
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