pub struct Track {
pub name: String,
pub artist: String,
pub playcount: u32,
pub timestamp: Option<u64>,
pub album: Option<String>,
pub album_artist: Option<String>,
}Expand description
Represents a music track with associated metadata.
This structure contains track information as parsed from Last.fm pages, including play count and optional timestamp data for scrobbles.
Fields§
§name: StringThe track name/title
artist: StringThe artist name
playcount: u32Number of times this track has been played/scrobbled
timestamp: Option<u64>Unix timestamp of when this track was scrobbled (if available)
This field is populated when tracks are retrieved from recent scrobbles
or individual scrobble data, but may be None for aggregate track listings.
album: Option<String>The album name (if available)
This field is populated when tracks are retrieved from recent scrobbles
where album information is available in the edit forms. May be None
for aggregate track listings or when album information is not available.
album_artist: Option<String>The album artist name, when the data source actually provides it.
None means unknown/not provided by the source — it must never be guessed (e.g. by
copying the track artist), because the two legitimately differ for compilations and
soundtracks. Values scraped from Last.fm edit forms are authoritative; the official
recent-tracks API does not supply album artist at all, so API-sourced tracks always
carry None.
Trait Implementations§
Source§impl<C: LastFmBaseClient + Clone> AsyncPaginatedIterator<Track> for ArtistTracksIterator<C>
impl<C: LastFmBaseClient + Clone> AsyncPaginatedIterator<Track> for ArtistTracksIterator<C>
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn current_page(&self) -> u32
fn current_page(&self) -> u32
Source§impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for ArtistTracksDirectIterator<C>
impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for ArtistTracksDirectIterator<C>
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn current_page(&self) -> u32
fn current_page(&self) -> u32
Source§impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for RecentTracksIterator<C>
impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for RecentTracksIterator<C>
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn current_page(&self) -> u32
fn current_page(&self) -> u32
Source§fn collect_all<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn collect_all<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<C: LastFmApiClient> AsyncPaginatedIterator<Track> for ApiRecentTracksIterator<C>
impl<C: LastFmApiClient> AsyncPaginatedIterator<Track> for ApiRecentTracksIterator<C>
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn current_page(&self) -> u32
fn current_page(&self) -> u32
Source§impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for AlbumTracksIterator<C>
impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for AlbumTracksIterator<C>
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn current_page(&self) -> u32
fn current_page(&self) -> u32
Source§fn collect_all<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn collect_all<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for SearchTracksIterator<C>
impl<C: LastFmBaseClient> AsyncPaginatedIterator<Track> for SearchTracksIterator<C>
Source§fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<Track>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn current_page(&self) -> u32
fn current_page(&self) -> u32
Source§impl<'de> Deserialize<'de> for Track
impl<'de> Deserialize<'de> for Track
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 Track
impl StructuralPartialEq for Track
Auto Trait Implementations§
impl Freeze for Track
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnsafeUnpin for Track
impl UnwindSafe for Track
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.