pub struct Song {
pub artist: Option<String>,
pub album: Option<String>,
pub title: Option<String>,
pub track: Option<u32>,
pub genre: Option<String>,
pub duration: Duration,
pub file: PathBuf,
pub elapsed: Duration,
}
Fields
artist: Option<String>
album: Option<String>
title: Option<String>
track: Option<u32>
genre: Option<String>
duration: Duration
file: PathBuf
elapsed: Duration
Implementations
sourceimpl Song
impl Song
pub fn artist(&self) -> Option<&str>
pub fn album(&self) -> Option<&str>
pub fn title(&self) -> Option<&str>
pub fn track(&self) -> Option<u32>
pub fn genre(&self) -> Option<&str>
pub fn duration(&self) -> Duration
pub fn elapsed(&self) -> Duration
pub fn file(&self) -> &Path
pub fn load(file: PathBuf) -> Result<Self, MelodyErrors>
pub fn matching_song(&self, s: &Song, matching_genre: bool) -> bool
pub fn exact_match(&self, s: &Song) -> bool
Trait Implementations
impl Eq for Song
impl StructuralEq for Song
impl StructuralPartialEq for Song
Auto Trait Implementations
impl RefUnwindSafe for Song
impl Send for Song
impl Sync for Song
impl Unpin for Song
impl UnwindSafe for Song
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more