Struct mpdpopm::clients::CurrentSong[][src]

pub struct CurrentSong {
    pub songid: u64,
    pub file: PathBuf,
    pub elapsed: f64,
    pub duration: f64,
}
Expand description

A description of the current track, suitable for our purposes (as in, it only tracks the attributes needed for this module’s functionality).

Fields

songid: u64

Identifier, unique within the play queue, identifying this particular track; if the same file is listed twice in the `mpd’ play queue each instance will get a distinct songid

file: PathBuf

Path, relative to `mpd’ music directory root of this track

elapsed: f64

Elapsed time, in seconds, in this track

duration: f64

Total track duration, in seconds

Implementations

Compute the ratio of the track that has elapsed, expressed as a floating point between 0 & 1

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.