[][src]Struct aspotify::model::Track

pub struct Track {
    pub album: AlbumSimplified,
    pub external_ids: HashMap<String, String>,
    pub popularity: u32,
    pub artists: Vec<ArtistSimplified>,
    pub available_markets: Option<Vec<CountryCode>>,
    pub disc_number: usize,
    pub duration: Duration,
    pub explicit: bool,
    pub external_urls: HashMap<String, String>,
    pub id: String,
    pub is_playable: Option<bool>,
    pub linked_from: Option<TrackLink>,
    pub restrictions: Option<Restrictions>,
    pub name: String,
    pub preview_url: Option<String>,
    pub track_number: usize,
    pub is_local: bool,
}

A track object.

Fields

album: AlbumSimplified

The album on which this track appears.

external_ids: HashMap<String, String>

Known external IDs for this track.

popularity: u32

The popularity of the track. The value will be between 0 and 100, with 100 being the most popular. The popularity is calculated from the total number of plays and how recent they are.

artists: Vec<ArtistSimplified>

The artists who performed the track.

available_markets: Option<Vec<CountryCode>>

The markets in which this track is available. Only Some if the market parameter is not supplied in the request.

disc_number: usize

The disc number (1 unless the album contains more than one disc).

duration: Duration

The track length.

explicit: bool

Whether the track has explicit lyrics, false if unknown.

external_urls: HashMap<String, String>

Known external URLs for this track.

id: String

The Spotify ID for this track.

is_playable: Option<bool>

When track relinking is applied, if the track is playable in the given market.

linked_from: Option<TrackLink>

When track relinking is applied and the requested track has been replaced by a different one.

restrictions: Option<Restrictions>

When track relinking is applied, the original track isn't available in the given market and Spotify didn't have any tracks to relink it with, then this is Some.

name: String

The name of the track.

preview_url: Option<String>

Link to a 30 second MP3 preview of the track, doesn't have to be there.

track_number: usize

The 1-indexed number of the track in its album; if the track has several discs, then it the number on the specified disc.

is_local: bool

Whether the track is from a local file.

Trait Implementations

impl Clone for Track[src]

impl Debug for Track[src]

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

impl Eq for Track[src]

impl PartialEq<Track> for Track[src]

impl Serialize for Track[src]

impl StructuralEq for Track[src]

impl StructuralPartialEq 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: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,