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