pub struct Track {Show 14 fields
pub path: PathBuf,
pub cover: Cover,
pub duration: Duration,
pub title: Option<String>,
pub artists: Option<Vec<String>>,
pub genres: Option<Vec<String>>,
pub album: 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: PathBufPath to the audio file.
cover: CoverCover art for the track.
duration: Duration§title: Option<String>§artists: Option<Vec<String>>§genres: Option<Vec<String>>§album: Option<String>Name of the album the track belongs to.
lyrics: Option<Lyrics>§comment: Option<String>§track: Option<u32>Index of the track in the album.
track_total: Option<u32>Total number of tracks in the album.
disc: Option<u32>§disc_total: Option<u32>§date: Option<Timestamp>Implementations§
Source§impl Track
impl Track
pub fn hash_self(&self) -> u64
pub fn hash_track(track: &Track) -> u64
pub fn hash_tracks<I, T>(tracks: I) -> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more