[][src]Struct melody::Playlist

pub struct Playlist {
    pub tracks: Vec<Song>,
}

Collection of Songs

Fields

tracks: Vec<Song>

List of songs in the playlist

Methods

impl Playlist[src]

pub fn from_dir(path: PathBuf) -> Option<Self>[src]

Create a playlist from a directory will walk through the directory and collect the songs it can process

pub fn is_empty(&self) -> bool[src]

Returns if the playlist is currently empty

pub fn filter_map(&mut self, f: impl FnMut(Song) -> Option<Song>)[src]

Takes FnMut(Song) and then maps & filters each song based on the functions result

Trait Implementations

impl From<Vec<Song>> for Playlist[src]

impl IntoIterator for Playlist[src]

type Item = Song

The type of the elements being iterated over.

type IntoIter = MinimalMusicPlayer

Which kind of iterator are we turning this into?

impl Debug for Playlist[src]

impl Display for Playlist[src]

Auto Trait Implementations

impl Send for Playlist

impl Sync for Playlist

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]