Struct bliss_audio::Song [−][src]
pub struct Song { pub path: String, pub artist: String, pub title: String, pub album: String, pub track_number: String, pub genre: String, pub analysis: Analysis, }
Expand description
Simple object used to represent a Song, with its path, analysis, and other metadata (artist, genre…)
Fields
path: String
Song’s provided file path
artist: String
Song’s artist, read from the metadata (""
if empty)
title: String
Song’s title, read from the metadata (""
if empty)
album: String
Song’s album name, read from the metadata (""
if empty)
track_number: String
Song’s tracked number, read from the metadata (""
if empty)
genre: String
Song’s genre, read from the metadata (""
if empty)
analysis: Analysis
bliss analysis results
Implementations
Compute the distance between the current song and any given Song.
The smaller the number, the closer the songs; usually more useful if compared between several songs (e.g. if song1.distance(song2) < song1.distance(song3), then song1 is closer to song2 than it is to song3.
Returns a decoded Song given a file path, or an error if the song could not be analyzed for some reason.
Arguments
path
- A string holding a valid file path to a valid audio file.
Errors
This function will return an error if the file path is invalid, if the file path points to a file containing no or corrupted audio stream, or if the analysis could not be conducted to the end for some reason.
The error type returned should give a hint as to whether it was a decoding (DecodingError) or an analysis (AnalysisError) error.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Song
impl UnwindSafe for Song
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V