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
sourceimpl PlayableItem
impl PlayableItem
sourcepub fn id(&self) -> Option<&dyn PlayableId>
pub fn id(&self) -> Option<&dyn 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
sourceimpl Clone for PlayableItem
impl Clone for PlayableItem
sourcefn clone(&self) -> PlayableItem
fn clone(&self) -> PlayableItem
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PlayableItem
impl Debug for PlayableItem
sourceimpl<'de> Deserialize<'de> for PlayableItem
impl<'de> Deserialize<'de> for PlayableItem
sourcefn 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
sourceimpl PartialEq<PlayableItem> for PlayableItem
impl PartialEq<PlayableItem> for PlayableItem
sourcefn eq(&self, other: &PlayableItem) -> bool
fn eq(&self, other: &PlayableItem) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PlayableItem) -> bool
fn ne(&self, other: &PlayableItem) -> bool
This method tests for !=
.
sourceimpl Serialize for PlayableItem
impl Serialize for PlayableItem
impl Eq for PlayableItem
impl StructuralEq for PlayableItem
impl StructuralPartialEq for PlayableItem
Auto Trait Implementations
impl RefUnwindSafe for PlayableItem
impl Send for PlayableItem
impl Sync for PlayableItem
impl Unpin for PlayableItem
impl UnwindSafe for PlayableItem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more