[−][src]Struct gift::Decoder
A builder which can be turned into either a BlockDecoder or a FrameDecoder.
Example
let mut frame_dec = gift::Decoder::new(gif).into_frame_decoder(); let preamble = frame_dec.preamble()?; println!("preamble: {:?}", preamble); for frame in frame_dec { println!("frame: {:?}", frame?); }
Methods
impl<R: Read> Decoder<R>[src]
pub fn new(r: R) -> Self[src]
Create a new Decoder
pub fn max_image_sz(self, max_image_sz: Option<usize>) -> Self[src]
Set the maximum image size (in bytes) to allow for decoding.
ⓘImportant traits for FrameDecoder<R>pub fn into_frame_decoder(self) -> FrameDecoder<R>[src]
ⓘImportant traits for FrameDecoder<R>
Convert the decoder into a frame decoder.
Trait Implementations
impl<R: Read> IntoIterator for Decoder<R>[src]
type Item = Result<Block, DecodeError>
The type of the elements being iterated over.
type IntoIter = BlockDecoder<R>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
Convert the decoder into a block decoder
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator, [src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,