pub struct RowDrain<'a> {
pub first_row: u32,
pub rows: u32,
pub width: u32,
pub layout: PixelLayout,
/* private fields */
}Expand description
A zero-copy borrow of contiguous finalized rows, yielded by a decoder’s
drain_rows.
The bytes are packed in the decoder’s requested PixelLayout, width * 4
per row. Draining is a non-consuming early view: each row is yielded once
(successive drain_rows calls return only newly finalized rows). The retained
bytes are freed on the next push to bound memory for a pure-streaming
consumer, but the decoder’s into_image still returns the complete image
(re-decoding any freed rows from the buffer).
Fields§
§first_row: u320-based output-row index of the first row in this batch.
rows: u32Number of rows in this batch.
width: u32Image width in pixels (each row is width * 4 bytes).
layout: PixelLayoutThe byte order of Self::as_bytes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RowDrain<'a>
impl<'a> RefUnwindSafe for RowDrain<'a>
impl<'a> Send for RowDrain<'a>
impl<'a> Sync for RowDrain<'a>
impl<'a> Unpin for RowDrain<'a>
impl<'a> UnsafeUnpin for RowDrain<'a>
impl<'a> UnwindSafe for RowDrain<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more