Skip to content

Commit

Permalink
add derivable traits to PlayableId and PlayContextId
Browse files Browse the repository at this point in the history
  • Loading branch information
SebRollen committed Aug 22, 2024
1 parent c38948f commit 9820e3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rspotify-model/src/idtypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ define_idtypes!(
/// Grouping up multiple kinds of IDs to treat them generically. This also
/// implements [`Id`], and [`From`] to instantiate it.
#[enum_dispatch(Id)]
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Hash)]
pub enum PlayContextId<'a> {
Artist(ArtistId<'a>),
Album(AlbumId<'a>),
Expand Down Expand Up @@ -521,6 +522,7 @@ impl<'a> PlayContextId<'a> {
/// Grouping up multiple kinds of IDs to treat them generically. This also
/// implements [`Id`] and [`From`] to instantiate it.
#[enum_dispatch(Id)]
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Hash)]
pub enum PlayableId<'a> {
Track(TrackId<'a>),
Episode(EpisodeId<'a>),
Expand Down

0 comments on commit 9820e3b

Please sign in to comment.