pub struct StreamingDecoder { /* private fields */ }
Expand description
GIF decoder which emits low-level events for items in the GIF file
To just get GIF frames, use crate::Decoder
instead.
Implementations§
source§impl StreamingDecoder
impl StreamingDecoder
sourcepub fn new() -> StreamingDecoder
pub fn new() -> StreamingDecoder
Creates a new streaming decoder
sourcepub fn update<'a>(
&'a mut self,
buf: &[u8],
write_into: &mut OutputBuffer<'_>,
) -> Result<(usize, Decoded), DecodingError>
pub fn update<'a>( &'a mut self, buf: &[u8], write_into: &mut OutputBuffer<'_>, ) -> Result<(usize, Decoded), DecodingError>
Updates the internal state of the decoder.
Returns the number of bytes consumed from the input buffer and the last decoding result.
sourcepub fn last_ext(&self) -> (AnyExtension, &[u8], bool)
pub fn last_ext(&self) -> (AnyExtension, &[u8], bool)
Returns the data of the last extension that has been decoded.
sourcepub fn current_frame_mut(&mut self) -> &mut Frame<'static>
pub fn current_frame_mut(&mut self) -> &mut Frame<'static>
Current frame info as a mutable ref.
sourcepub fn current_frame(&self) -> &Frame<'static>
pub fn current_frame(&self) -> &Frame<'static>
Current frame info as a ref.
Auto Trait Implementations§
impl Freeze for StreamingDecoder
impl !RefUnwindSafe for StreamingDecoder
impl Send for StreamingDecoder
impl !Sync for StreamingDecoder
impl Unpin for StreamingDecoder
impl !UnwindSafe for StreamingDecoder
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