Struct gif::StreamingDecoder
source · [−]pub struct StreamingDecoder { /* private fields */ }
Expand description
GIF decoder which supports streaming
Implementations
sourceimpl 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]
) -> Result<(usize, Decoded<'a>), DecodingError>
pub fn update<'a>(
&'a mut self,
buf: &[u8]
) -> Result<(usize, Decoded<'a>), 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<'a>(&'a mut self) -> &'a mut Frame<'static>
pub fn current_frame_mut<'a>(&'a mut self) -> &'a mut Frame<'static>
Current frame info as a mutable ref.
sourcepub fn current_frame<'a>(&'a self) -> &'a Frame<'static>
pub fn current_frame<'a>(&'a self) -> &'a Frame<'static>
Current frame info as a ref.
sourcepub fn version(&self) -> Version
pub fn version(&self) -> Version
The version number of the GIF standard used in this image.
We suppose a minimum of V87a
compatibility. This value will be reported until we have
read the version information in the magic header bytes.
sourcepub fn set_extensions(&mut self, extensions: Extensions)
👎 Deprecated: Does not work as intended. In fact, doesn’t do anything. This may disappear soon.
pub fn set_extensions(&mut self, extensions: Extensions)
👎 Deprecated:
Does not work as intended. In fact, doesn’t do anything. This may disappear soon.
Configure whether extensions are saved or skipped.
Auto Trait Implementations
impl !RefUnwindSafe for StreamingDecoder
impl Send for StreamingDecoder
impl !Sync for StreamingDecoder
impl Unpin for StreamingDecoder
impl !UnwindSafe for StreamingDecoder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more