#[non_exhaustive]pub struct TrackItem {
pub id: String,
pub name: String,
pub duration: Option<u32>,
pub cover: Vec<Thumbnail>,
pub artists: Vec<ArtistId>,
pub artist_id: Option<String>,
pub album: Option<AlbumId>,
pub view_count: Option<u64>,
pub track_type: TrackType,
pub track_nr: Option<u16>,
pub by_va: bool,
}Expand description
YouTube Music track list item
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: StringTrack name
duration: Option<u32>Track duration in seconds
None when extracted from an artist page or a featured video.
cover: Vec<Thumbnail>Album cover
artists: Vec<ArtistId>Artists of the track
artist_id: Option<String>Primary artist ID
album: Option<AlbumId>Album of the track
view_count: Option<u64>View count
None if it is a not a video or the view count could not be extracted.
track_type: TrackTypeType of the track (YTM track / music video / podcast episode)
track_nr: Option<u16>Album track number
None if the track is not fetched from an album.
by_va: boolIs the track by ‘Various artists’?
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TrackItem
impl<'de> Deserialize<'de> for TrackItem
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 FromYtItem for TrackItem
impl FromYtItem for TrackItem
Source§fn from_ytm_item(item: MusicItem) -> Option<Self>
fn from_ytm_item(item: MusicItem) -> Option<Self>
Casting from a generic YouTube Music item to a specific kind Read more
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 TrackItem
impl StructuralPartialEq for TrackItem
Auto Trait Implementations§
impl Freeze for TrackItem
impl RefUnwindSafe for TrackItem
impl Send for TrackItem
impl Sync for TrackItem
impl Unpin for TrackItem
impl UnwindSafe for TrackItem
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