pub struct VideoMetadata {Show 17 fields
pub schema: u32,
pub video_id: String,
pub title: String,
pub channel: Option<String>,
pub channel_id: Option<String>,
pub channel_url: Option<String>,
pub category: Option<String>,
pub published_at: Option<String>,
pub duration_seconds: Option<u64>,
pub description: Option<String>,
pub keywords: Vec<String>,
pub view_count: Option<u64>,
pub like_count: Option<u64>,
pub is_live_content: bool,
pub is_unlisted: Option<bool>,
pub thumbnail_url: Option<String>,
pub fetched_at: DateTime<Utc>,
}Expand description
Per-video metadata sidecar, serialised to <video-id>.meta.yaml.
view_count / like_count are point-in-time snapshots; Self::fetched_at
is what makes them honest and is the refresh-staleness key. Fields sourced
from microformat are Option because that block is absent for
private/removed videos, in which case the sidecar is written from
videoDetails alone.
Fields§
§schema: u32Sidecar schema version (always SCHEMA_VERSION when written).
video_id: String11-character video ID.
title: StringDisplay title.
channel: Option<String>Channel / uploader name.
channel_id: Option<String>UC… channel ID.
channel_url: Option<String>Owner profile URL (the @handle URL). From microformat.
category: Option<String>Video category (e.g. Music). From microformat.
published_at: Option<String>Publish timestamp, full ISO 8601 with original offset preserved
(e.g. 2009-10-24T23:57:33-07:00). From microformat.publishDate.
duration_seconds: Option<u64>Duration in seconds.
description: Option<String>Full description (videoDetails.shortDescription, despite the name).
keywords: Vec<String>Free-text keywords/tags.
view_count: Option<u64>View count at fetch time.
like_count: Option<u64>Like count at fetch time. Absent when ratings are disabled.
is_live_content: boolWhether this is (or was) a live broadcast.
is_unlisted: Option<bool>Whether the video is unlisted. From microformat.
thumbnail_url: Option<String>Best available thumbnail URL (maxres when present).
fetched_at: DateTime<Utc>When this sidecar was fetched (UTC). The refresh-staleness key.
Trait Implementations§
Source§impl Clone for VideoMetadata
impl Clone for VideoMetadata
Source§fn clone(&self) -> VideoMetadata
fn clone(&self) -> VideoMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
impl Eq for VideoMetadata
Source§impl PartialEq for VideoMetadata
impl PartialEq for VideoMetadata
Source§fn eq(&self, other: &VideoMetadata) -> bool
fn eq(&self, other: &VideoMetadata) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for VideoMetadata
impl Serialize for VideoMetadata
impl StructuralPartialEq for VideoMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.