pub struct Thumbnail {
pub timestamp_ms: u64,
pub width: u32,
pub height: u32,
pub data: Vec<u8>,
}Expand description
A single generated thumbnail.
Fields§
§timestamp_ms: u64Timestamp in the source video (milliseconds).
width: u32Width of this thumbnail in pixels.
height: u32Height of this thumbnail in pixels.
data: Vec<u8>Raw pixel data (RGBA, row-major).
Implementations§
Source§impl Thumbnail
impl Thumbnail
Sourcepub fn new(timestamp_ms: u64, width: u32, height: u32, data: Vec<u8>) -> Self
pub fn new(timestamp_ms: u64, width: u32, height: u32, data: Vec<u8>) -> Self
Creates a new thumbnail with the given parameters.
Sourcepub fn pixel_count(&self) -> usize
pub fn pixel_count(&self) -> usize
Returns the number of pixels in this thumbnail.
Sourcepub fn expected_byte_len(&self) -> usize
pub fn expected_byte_len(&self) -> usize
Returns the expected byte length for RGBA data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Thumbnail
impl RefUnwindSafe for Thumbnail
impl Send for Thumbnail
impl Sync for Thumbnail
impl Unpin for Thumbnail
impl UnsafeUnpin for Thumbnail
impl UnwindSafe for Thumbnail
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> 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