pub struct WebPIDecoder<'a, 'b> { /* private fields */ }Expand description
The incremental decoder.
'a is the lifetime of what the caller lends to the decoder for its whole
life: the decoding options and output buffer of a WebPDecoderConfig, or
the output buffer of WebPINewDecoder, and the hooks of WebPISetIOHooks.
'b is the lifetime of the caller’s memory that an output buffer borrows.
C’s params.output is user_output when the caller supplied a buffer and
output otherwise. C keeps the alpha chunk in the VP8 decoder
(dec->alpha_data); here it is a position in the input, kept by its owner.
Trait Implementations§
Source§impl Drop for WebPIDecoder<'_, '_>
impl Drop for WebPIDecoder<'_, '_>
Source§fn drop(&mut self)
fn drop(&mut self)
Synchronizes the thread and tears the io down for a lossy decoding in progress, then releases the decoder, the memory buffer and the decoder’s own output buffer. No row is pending at this point, because every call ends with the worker synchronized; in map mode the caller’s buffer is gone, so the alpha chunk is not passed.