[][src]Struct deezer::models::Track

pub struct Track {
    pub id: u64,
    pub readable: bool,
    pub title: String,
    pub title_short: String,
    pub title_version: String,
    pub unseen: Option<bool>,
    pub isrc: String,
    pub link: String,
    pub share_link: String,
    pub duration_in_seconds: u64,
    pub track_position_in_album: u64,
    pub album_disk_number: u64,
    pub rank: u64,
    pub release_date: String,
    pub has_explicit_lyrics: bool,
    pub preview_url: Option<String>,
    pub bpm: f32,
    pub gain: f32,
    pub available_countries: Vec<String>,
    pub alternative_track_id: Option<u64>,
    pub contributors: Vec<ContributorArtist>,
    pub artist: TrackArtist,
    pub album: TrackAlbum,
}

Contains all the information provided for a Track.

Examples

You can query a track by id via the DeezerObject::get() method:

let track = Track::get(912486).await?.unwrap();

Or you can use DeezerClient::track():

let deezer = DeezerClient::new();
let track = deezer.track(912486).await?.unwrap();

Fields

id: u64

The track's Deezer id

readable: bool

True if the track is readable in the player for the current user

title: String

The track's full title

title_short: String

The track's short title

title_version: String

The track's version

unseen: Option<bool>

The track's unseen status

isrc: String

The track's isrc

link: String

The url of the track on Deezer

share_link: String

The share link of the track on Deezer

duration_in_seconds: u64

The track's duration in seconds

track_position_in_album: u64

The position of the track in its album

album_disk_number: u64

The track's album's disk number

rank: u64

The track's Deezer rank

release_date: String

The track's release date

has_explicit_lyrics: bool

Whether the track contains explicit lyrics

preview_url: Option<String>

The url of track's preview file. This file contains the first 30 seconds of the track

bpm: f32

Beats per minute

gain: f32

Signal strength

available_countries: Vec<String>

List of countries where the track is available

alternative_track_id: Option<u64>

Return an alternative readable track if the current track is not readable

contributors: Vec<ContributorArtist>

Return a list of contributors on the track

artist: TrackArtist

Artist Object

album: TrackAlbum

Album Object

Trait Implementations

impl Clone for Track[src]

impl Debug for Track[src]

impl DeezerObject for Track[src]

impl<'de> Deserialize<'de> for Track[src]

impl Serialize for Track[src]

Auto Trait Implementations

impl RefUnwindSafe for Track

impl Send for Track

impl Sync for Track

impl Unpin for Track

impl UnwindSafe for Track

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.