Enum rspotify_model::PlayableItem
source · pub enum PlayableItem {
Track(FullTrack),
Episode(FullEpisode),
}Expand description
A full track object or a full episode object
Variants§
Track(FullTrack)
Episode(FullEpisode)
Implementations§
source§impl PlayableItem
impl PlayableItem
sourcepub fn id(&self) -> Option<PlayableId<'_>>
pub fn id(&self) -> Option<PlayableId<'_>>
Utility to get the ID from either variant in the enum.
Note that if it’s a track and if it’s local, it may not have an ID, in
which case this function will return None.
Trait Implementations§
source§impl Clone for PlayableItem
impl Clone for PlayableItem
source§fn clone(&self) -> PlayableItem
fn clone(&self) -> PlayableItem
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PlayableItem
impl Debug for PlayableItem
source§impl<'de> Deserialize<'de> for PlayableItem
impl<'de> Deserialize<'de> for PlayableItem
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