Struct termusiclib::track::Track
source · pub struct Track {
pub last_modified: SystemTime,
pub media_type: Option<MediaType>,
pub podcast_localfile: Option<String>,
/* private fields */
}Fields§
§last_modified: SystemTime§media_type: Option<MediaType>§podcast_localfile: Option<String>Implementations§
source§impl Track
impl Track
pub fn from_episode(ep: &Episode) -> Self
pub fn read_from_path<P: AsRef<Path>>(path: P, for_db: bool) -> Result<Self>
pub fn new_radio(url: &str) -> Self
pub fn adjust_lyric_delay(&mut self, time_pos: i64, offset: i64) -> Result<()>
pub fn cycle_lyrics(&mut self) -> Result<&Lyrics>
pub const fn parsed_lyric(&self) -> Option<&Lyric>
pub fn set_parsed_lyric(&mut self, pl: Option<Lyric>)
pub fn lyric_frames_remove_selected(&mut self)
pub fn set_lyric_selected_index(&mut self, index: usize)
pub const fn lyric_selected_index(&self) -> usize
pub fn lyric_selected(&self) -> Option<&Lyrics>
pub fn lyric_frames_is_empty(&self) -> bool
pub fn lyric_frames_len(&self) -> usize
pub fn lyric_frames(&self) -> Option<Vec<Lyrics>>
pub const fn picture(&self) -> Option<&Picture>
pub fn album_photo(&self) -> Option<&str>
sourcepub fn artist(&self) -> Option<&str>
pub fn artist(&self) -> Option<&str>
Optionally return the artist of the song
If None it wasn’t able to read the tags
pub fn set_artist(&mut self, a: &str)
sourcepub fn album(&self) -> Option<&str>
pub fn album(&self) -> Option<&str>
Optionally return the song’s album
If None failed to read the tags
pub fn set_album(&mut self, album: &str)
pub fn genre(&self) -> Option<&str>
pub fn set_genre(&mut self, genre: &str)
sourcepub fn title(&self) -> Option<&str>
pub fn title(&self) -> Option<&str>
Optionally return the title of the song
If None it wasn’t able to read the tags
pub fn set_title(&mut self, title: &str)
pub fn file(&self) -> Option<&str>
pub fn directory(&self) -> Option<&str>
pub fn ext(&self) -> Option<&str>
pub const fn duration(&self) -> Duration
pub fn duration_formatted(&self) -> String
pub fn duration_formatted_short(d: &Duration) -> String
pub fn name(&self) -> Option<&str>
pub fn save_tag(&mut self) -> Result<()>
pub fn set_lyric(&mut self, lyric_str: &str, lang_ext: &str)
pub fn set_photo(&mut self, picture: Picture)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnwindSafe for Track
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