pub struct Encoder<W: Write> { /* private fields */ }
Expand description
GIF encoder.
Implementations
sourceimpl<W: Write> Encoder<W>
impl<W: Write> Encoder<W>
sourcepub fn encode(&mut self, frame: &Frame<'_>) -> ImageResult<()>
pub fn encode(&mut self, frame: &Frame<'_>) -> ImageResult<()>
Encodes a frame.
sourcepub fn encode_frames<F>(&mut self, frames: F) -> ImageResult<()>where
F: IntoIterator<Item = Frame>,
pub fn encode_frames<F>(&mut self, frames: F) -> ImageResult<()>where
F: IntoIterator<Item = Frame>,
Encodes Frames.
Consider using try_encode_frames
instead to encode an animation::Frames
like iterator.
sourcepub fn try_encode_frames<F>(&mut self, frames: F) -> ImageResult<()>where
F: IntoIterator<Item = ImageResult<Frame>>,
pub fn try_encode_frames<F>(&mut self, frames: F) -> ImageResult<()>where
F: IntoIterator<Item = ImageResult<Frame>>,
Try to encode a collection of ImageResult<animation::Frame>
objects.
Use this function to encode an animation::Frames
like iterator.
Whenever an Err
item is encountered, that value is returned without further actions.
Auto Trait Implementations
impl<W> RefUnwindSafe for Encoder<W>where
W: RefUnwindSafe,
impl<W> Send for Encoder<W>where
W: Send,
impl<W> Sync for Encoder<W>where
W: Sync,
impl<W> Unpin for Encoder<W>where
W: Unpin,
impl<W> UnwindSafe for Encoder<W>where
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more