pub struct AnimatedThumbnail {
pub width: u32,
pub height: u32,
pub frames: Vec<AnimatedFrame>,
pub total_duration_ms: u64,
pub loop_count: u32,
}Expand description
An animated thumbnail consisting of multiple frames with timing.
Represents a short looping preview (e.g. 2–5 seconds) from key moments in a video. The frames are raw RGBA with per-frame duration.
Fields§
§width: u32Width of each frame in pixels.
height: u32Height of each frame in pixels.
frames: Vec<AnimatedFrame>Frames with their display durations.
total_duration_ms: u64Total duration of the animation in milliseconds.
loop_count: u32Number of times to loop (0 = infinite).
Implementations§
Source§impl AnimatedThumbnail
impl AnimatedThumbnail
Sourcepub fn from_thumbnails(
thumbnails: &[Thumbnail],
frame_duration_ms: u64,
loop_count: u32,
) -> Option<Self>
pub fn from_thumbnails( thumbnails: &[Thumbnail], frame_duration_ms: u64, loop_count: u32, ) -> Option<Self>
Creates a new animated thumbnail from a list of source thumbnails.
Each thumbnail is assigned a uniform frame duration.
Returns None if thumbnails is empty or dimensions are zero.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Returns the number of frames in the animation.
Sourcepub fn total_byte_size(&self) -> usize
pub fn total_byte_size(&self) -> usize
Returns the total byte size of all frame data.
Trait Implementations§
Source§impl Clone for AnimatedThumbnail
impl Clone for AnimatedThumbnail
Source§fn clone(&self) -> AnimatedThumbnail
fn clone(&self) -> AnimatedThumbnail
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for AnimatedThumbnail
impl RefUnwindSafe for AnimatedThumbnail
impl Send for AnimatedThumbnail
impl Sync for AnimatedThumbnail
impl Unpin for AnimatedThumbnail
impl UnsafeUnpin for AnimatedThumbnail
impl UnwindSafe for AnimatedThumbnail
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more