pub enum Playable {
Track {
track: Box<PlayableTrack>,
},
Album {
album: Box<PlayableAlbum>,
},
Artist {
artist: ArtistId,
tracks: Vec<PlayableTrack>,
albums: Vec<PlayableAlbum>,
},
Collection {
collection: CollectionId,
playables: Vec<Playable>,
},
}Variants§
Implementations§
Source§impl Playable
impl Playable
pub fn flatten_shuffle(self, shuffle_mode: ShuffleMode) -> Vec<PlayableTrack>
pub fn flatten(self) -> Vec<PlayableTrack>
pub fn from_collectable( collectable: Collectable, db: &LibraryDb, ) -> Result<Playable, DatabaseError>
pub fn to_collectable(&self) -> Collectable
pub fn display(&self) -> Result<String, DatabaseError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Playable
impl<'de> Deserialize<'de> for Playable
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
Source§impl Extend<Playable> for Playlist
impl Extend<Playable> for Playlist
Source§fn extend<T: IntoIterator<Item = Playable>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Playable>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl Freeze for Playable
impl RefUnwindSafe for Playable
impl Send for Playable
impl Sync for Playable
impl Unpin for Playable
impl UnsafeUnpin for Playable
impl UnwindSafe for Playable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more