Struct mpd::status::Status

source ·
pub struct Status {
Show 21 fields pub volume: i8, pub repeat: bool, pub random: bool, pub single: bool, pub consume: bool, pub queue_version: u32, pub queue_len: u32, pub state: State, pub song: Option<QueuePlace>, pub nextsong: Option<QueuePlace>, pub time: Option<(Duration, Duration)>, pub elapsed: Option<Duration>, pub duration: Option<Duration>, pub bitrate: Option<u32>, pub crossfade: Option<Duration>, pub mixrampdb: f32, pub mixrampdelay: Option<Duration>, pub audio: Option<AudioFormat>, pub updating_db: Option<u32>, pub error: Option<String>, pub replaygain: Option<ReplayGain>,
}
Expand description

MPD status

Fields§

§volume: i8

volume (0-100, or -1 if volume is unavailable (e.g. for HTTPD output type)

§repeat: bool

repeat mode

§random: bool

random mode

§single: bool

single mode

§consume: bool

consume mode

§queue_version: u32

queue version number

§queue_len: u32

queue length

§state: State

playback state

§song: Option<QueuePlace>

currently playing song place in the queue

§nextsong: Option<QueuePlace>

next song to play place in the queue

§time: Option<(Duration, Duration)>

time current song played, and total song duration (in seconds resolution)

§elapsed: Option<Duration>

elapsed play time current song played (in milliseconds resolution)

§duration: Option<Duration>

current song duration

§bitrate: Option<u32>

current song bitrate, kbps

§crossfade: Option<Duration>

crossfade timeout, seconds

§mixrampdb: f32

mixramp threshold, dB

§mixrampdelay: Option<Duration>

mixramp duration, seconds

§audio: Option<AudioFormat>

current audio playback format

§updating_db: Option<u32>

current DB updating job number (if DB updating is in progress)

§error: Option<String>

last player error (if happened, can be reset with clearerror() method)

§replaygain: Option<ReplayGain>

replay gain mode

Trait Implementations§

source§

impl Clone for Status

source§

fn clone(&self) -> Status

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Status

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Status

source§

fn default() -> Status

Returns the “default value” for a type. Read more
source§

impl PartialEq<Status> for Status

source§

fn eq(&self, other: &Status) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Status

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.