#[non_exhaustive]pub struct VideoItem {
pub id: String,
pub name: String,
pub duration: Option<u32>,
pub thumbnail: Vec<Thumbnail>,
pub channel: Option<ChannelTag>,
pub publish_date: Option<OffsetDateTime>,
pub publish_date_txt: Option<String>,
pub view_count: Option<u64>,
pub is_live: bool,
pub is_short: bool,
pub is_upcoming: bool,
pub short_description: Option<String>,
}Expand description
YouTube video list item (from search results, recommendations, playlists)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringUnique YouTube video ID
name: StringVideo title
duration: Option<u32>Video duration in seconds.
Is None for livestreams.
thumbnail: Vec<Thumbnail>Video thumbnail
channel: Option<ChannelTag>Channel of the video
publish_date: Option<OffsetDateTime>Video publishing date.
None if the date could not be parsed.
publish_date_txt: Option<String>Textual video publish date (e.g. 11 months ago, depends on language)
Is None for livestreams and upcoming videos.
view_count: Option<u64>View count
None if it could not be extracted.
is_live: boolIs the video an active livestream?
is_short: boolIs the video a YouTube Short video (vertical and <60s)?
is_upcoming: boolIs the video announced, but not released yet (YouTube Premiere)?
short_description: Option<String>Abbreviated video description
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VideoItem
impl<'de> Deserialize<'de> for VideoItem
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
Source§impl From<VideoItem> for YouTubeItem
impl From<VideoItem> for YouTubeItem
Source§impl FromYtItem for VideoItem
impl FromYtItem for VideoItem
Source§fn from_yt_item(item: YouTubeItem) -> Option<Self>
fn from_yt_item(item: YouTubeItem) -> Option<Self>
Casting from a generic YouTube item to a specific kind Read more
impl Eq for VideoItem
impl StructuralPartialEq for VideoItem
Auto Trait Implementations§
impl Freeze for VideoItem
impl RefUnwindSafe for VideoItem
impl Send for VideoItem
impl Sync for VideoItem
impl Unpin for VideoItem
impl UnwindSafe for VideoItem
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