pub struct VideoMetadata {Show 14 fields
pub id: String,
pub title: String,
pub duration: Duration,
pub resolution: (u32, u32),
pub format: VideoFormat,
pub file_size: u64,
pub bitrate: u32,
pub frame_rate: f64,
pub audio_tracks: u32,
pub audio_bitrate: u32,
pub video_codec: String,
pub audio_codec: String,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Video metadata structure
Fields§
§id: StringUnique identifier for the video
title: StringVideo title
duration: DurationVideo duration
resolution: (u32, u32)Video resolution (width, height)
format: VideoFormatVideo format
file_size: u64Video file size in bytes
bitrate: u32Video bitrate in kbps
frame_rate: f64Video frame rate
audio_tracks: u32Number of audio tracks
audio_bitrate: u32Audio bitrate in kbps
video_codec: StringVideo codec
audio_codec: StringAudio codec
created_at: DateTime<Utc>Creation timestamp
updated_at: DateTime<Utc>Last updated timestamp
Implementations§
Source§impl VideoMetadata
impl VideoMetadata
Sourcepub fn new(
title: String,
duration: Duration,
resolution: (u32, u32),
format: VideoFormat,
) -> Self
pub fn new( title: String, duration: Duration, resolution: (u32, u32), format: VideoFormat, ) -> Self
Create a new VideoMetadata instance
Sourcepub fn update_timestamp(&mut self)
pub fn update_timestamp(&mut self)
Update the updated_at timestamp
Trait Implementations§
Source§impl Clone for VideoMetadata
impl Clone for VideoMetadata
Source§fn clone(&self) -> VideoMetadata
fn clone(&self) -> VideoMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VideoMetadata
impl Debug for VideoMetadata
Source§impl<'de> Deserialize<'de> for VideoMetadata
impl<'de> Deserialize<'de> for VideoMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VideoMetadata
impl RefUnwindSafe for VideoMetadata
impl Send for VideoMetadata
impl Sync for VideoMetadata
impl Unpin for VideoMetadata
impl UnsafeUnpin for VideoMetadata
impl UnwindSafe for VideoMetadata
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