pub struct EncodingStream<W>where
W: Write,{ /* private fields */ }Expand description
Active streaming encoding session.
Created by StreamingEncoder::start_rgb() or StreamingEncoder::start_gray().
Accepts scanlines via write_scanlines() and must be
finalized with finish().
Implementations§
Source§impl<W> EncodingStream<W>where
W: Write,
impl<W> EncodingStream<W>where
W: Write,
Sourcepub fn write_scanlines(&mut self, data: &[u8]) -> Result<(), Error>
pub fn write_scanlines(&mut self, data: &[u8]) -> Result<(), Error>
Write scanlines to the encoder.
Scanlines are buffered until a complete MCU row is available, then encoded.
The number of bytes should be num_lines * width * bytes_per_pixel.
For best performance, write in multiples of the MCU height (8 or 16 lines).
Auto Trait Implementations§
impl<W> Freeze for EncodingStream<W>where
W: Freeze,
impl<W> RefUnwindSafe for EncodingStream<W>where
W: RefUnwindSafe,
impl<W> Send for EncodingStream<W>where
W: Send,
impl<W> Sync for EncodingStream<W>where
W: Sync,
impl<W> Unpin for EncodingStream<W>where
W: Unpin,
impl<W> UnwindSafe for EncodingStream<W>where
W: UnwindSafe,
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