pub enum FrameSource {
Decoded(Vec<ImageDescriptor<'static>>),
Static(&'static [ImageDescriptor<'static>]),
}Expand description
Source of pre-decoded ImageDescriptor frames for AnimImage.
The widget never decodes image data; frames are provided by the caller.
For std targets, decode GIF/APNG once using rlvgl_core::plugins::gif /
rlvgl_core::plugins::apng and convert each frame to an
ImageDescriptor<'static> before constructing AnimImage.
Variants§
Decoded(Vec<ImageDescriptor<'static>>)
Heap-resident frames decoded at load time.
Static(&'static [ImageDescriptor<'static>])
Statically allocated frame array for no_std / ROM targets.
Implementations§
Source§impl FrameSource
impl FrameSource
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Return the number of frames available.
Sourcepub fn get(&self, index: usize) -> Option<&ImageDescriptor<'static>>
pub fn get(&self, index: usize) -> Option<&ImageDescriptor<'static>>
Return the frame at index, or None when out of bounds.
Auto Trait Implementations§
impl Freeze for FrameSource
impl RefUnwindSafe for FrameSource
impl Send for FrameSource
impl Sync for FrameSource
impl Unpin for FrameSource
impl UnsafeUnpin for FrameSource
impl UnwindSafe for FrameSource
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