pub struct FilePlaylist {
pub list: Vec<Song>,
pub cursor_index: Option<usize>,
pub playing_index: Option<usize>,
}Fields§
§list: Vec<Song>§cursor_index: Option<usize>§playing_index: Option<usize>Implementations§
Source§impl FilePlaylist
impl FilePlaylist
pub fn new() -> Self
pub fn first_index_for_viewport(&self, viewport_height: usize) -> usize
pub fn playlist(&self) -> &[Song]
pub fn clear(&mut self)
pub fn append_song(&mut self, s: Song)
pub fn remove_song(&mut self, index: usize) -> Song
pub fn get_cursor_index(&self) -> Option<usize>
pub fn set_cursor_index(&mut self, index: Option<usize>)
pub fn get_playing_index(&self) -> Option<usize>
pub fn set_playing_index(&mut self, index: Option<usize>)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn list_ref(&self) -> &Vec<Song>
pub fn list_mut(&mut self) -> &mut Vec<Song>
Trait Implementations§
Source§impl Clone for FilePlaylist
impl Clone for FilePlaylist
Source§fn clone(&self) -> FilePlaylist
fn clone(&self) -> FilePlaylist
Returns a duplicate 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 FilePlaylist
impl Debug for FilePlaylist
Source§impl Default for FilePlaylist
impl Default for FilePlaylist
Source§impl<'de> Deserialize<'de> for FilePlaylist
impl<'de> Deserialize<'de> for FilePlaylist
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
Auto Trait Implementations§
impl Freeze for FilePlaylist
impl RefUnwindSafe for FilePlaylist
impl Send for FilePlaylist
impl Sync for FilePlaylist
impl Unpin for FilePlaylist
impl UnwindSafe for FilePlaylist
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