pub struct Track {
pub name: String,
pub artist: String,
pub playcount: u32,
pub timestamp: Option<u64>,
}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.
§Examples
use lastfm_edit::Track;
let track = Track {
name: "Paranoid Android".to_string(),
artist: "Radiohead".to_string(),
playcount: 42,
timestamp: Some(1640995200), // Unix timestamp
};
println!("{} by {} (played {} times)", track.name, track.artist, track.playcount);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.
Trait Implementations§
Source§impl IntoEditContext for Track
impl IntoEditContext for Track
Source§fn into_edit_context(self) -> ScrobbleEditContext
fn into_edit_context(self) -> ScrobbleEditContext
Convert a Track into a ScrobbleEditContext.
The resulting context uses EditStrategy::EditAll by default and
doesn’t include album information since track listings don’t have
reliable album data.
Auto Trait Implementations§
impl Freeze for Track
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin 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
Mutably borrows from an owned value. Read more