pub struct CaptureScratch<'a> { /* private fields */ }Expand description
Reusable caller-owned or budget-borrowed f64 scratch workspace for PlanarCapturePlan::execute.
Use CaptureScratch::from_f64_slice with a caller-allocated or StorageBudget-backed
slice for zero-heap capture on native conversion routes (a custom external CmsTransform
invoked inside Stage 1 may still allocate unless its CmsQuote::apply_scratch_bytes
is Some(0)), or CaptureScratch::owned to reuse one fallibly allocated buffer across frames.
Implementations§
Source§impl<'a> CaptureScratch<'a>
impl<'a> CaptureScratch<'a>
Sourcepub fn from_f64_slice(slice: &'a mut [f64]) -> Self
pub fn from_f64_slice(slice: &'a mut [f64]) -> Self
Borrow a caller-provided &mut [f64] workspace (never heap-allocates; fails with
ConvertError::DimensionMismatch if shorter than PlanarCapturePlan::required_scratch_f64s).
Source§impl CaptureScratch<'static>
impl CaptureScratch<'static>
Sourcepub const fn owned() -> Self
pub const fn owned() -> Self
Create an empty owned scratch buffer that grows fallibly on first use and reuses capacity.
Sourcepub fn with_capacity_f64s(len_f64s: usize) -> Result<Self, At<ConvertError>>
pub fn with_capacity_f64s(len_f64s: usize) -> Result<Self, At<ConvertError>>
Pre-allocate an owned scratch buffer for at least len_f64s f64 elements.