pub struct Track {Show 14 fields
pub path: PathBuf,
pub cover_path: Option<PathBuf>,
pub duration: Duration,
pub artist: Option<String>,
pub title: Option<String>,
pub album: Option<String>,
pub genre: Option<String>,
pub lyrics: Option<Lyrics>,
pub comment: Option<String>,
pub track: Option<u32>,
pub track_total: Option<u32>,
pub disc: Option<u32>,
pub disc_total: Option<u32>,
pub date: Option<Timestamp>,
}Fields§
§path: PathBuf§cover_path: Option<PathBuf>§duration: Duration§artist: Option<String>§title: Option<String>§album: Option<String>§genre: Option<String>§lyrics: Option<Lyrics>§comment: Option<String>§track: Option<u32>§track_total: Option<u32>§disc: Option<u32>§disc_total: Option<u32>§date: Option<Timestamp>Implementations§
Source§impl Track
impl Track
Sourcepub fn get_cover(&mut self, tag: &Tag) -> Result<(), CoverError>
pub fn get_cover(&mut self, tag: &Tag) -> Result<(), CoverError>
Set the cover art from cache or extract it from the source file.
Sourcepub fn extract_cover(&mut self, tag: &Tag) -> Result<(), CoverError>
pub fn extract_cover(&mut self, tag: &Tag) -> Result<(), CoverError>
Extract the cover art from the source file discarding the cache contents.
pub fn hash_self(&self) -> u64
pub fn hash_track(track: &Track) -> u64
pub fn hash_tracks(tracks: &Vec<Track>) -> Vec<u64>
pub fn track_id(&self, position: usize) -> TrackId
pub fn get_meta(&self, position: usize) -> Metadata
pub fn open_file(&self) -> Result<File>
pub fn open_source(&self) -> Result<Decoder<BufReader<File>>, String>
Trait Implementations§
impl Eq for Track
impl StructuralPartialEq for Track
Auto Trait Implementations§
impl Freeze for Track
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnsafeUnpin 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