Struct sic_core::AnimatedImage
source · pub struct AnimatedImage { /* private fields */ }
Implementations§
source§impl AnimatedImage
impl AnimatedImage
sourcepub fn from_frames(frames: Vec<Frame>) -> Self
pub fn from_frames(frames: Vec<Frame>) -> Self
Consume a collection of frames to produce an AnimatedImage
sourcepub fn try_into_static_image(
self,
index: usize
) -> Result<DynamicImage, SicCoreError>
pub fn try_into_static_image( self, index: usize ) -> Result<DynamicImage, SicCoreError>
Returns the selected frame from the animated image as static image
sourcepub fn frames_mut(&mut self) -> &mut [Frame]
pub fn frames_mut(&mut self) -> &mut [Frame]
Returns a mutable slice of image frames
sourcepub fn collect_frames(&self) -> Vec<Frame>
pub fn collect_frames(&self) -> Vec<Frame>
Collects and returns an owned collection of image frames
Trait Implementations§
source§impl Clone for AnimatedImage
impl Clone for AnimatedImage
source§fn clone(&self) -> AnimatedImage
fn clone(&self) -> AnimatedImage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnimatedImage
impl Debug for AnimatedImage
Auto Trait Implementations§
impl RefUnwindSafe for AnimatedImage
impl Send for AnimatedImage
impl Sync for AnimatedImage
impl Unpin for AnimatedImage
impl UnwindSafe for AnimatedImage
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