Struct Status

Source
pub struct Status {
Show 23 fields pub partition: Option<String>, pub volume: Option<u8>, pub repeat: bool, pub random: bool, pub single: String, pub consume: bool, pub playlist: u32, pub playlistlength: u32, pub song: Option<u32>, pub songid: Option<u32>, pub nextsong: Option<u32>, pub nextsongid: Option<u32>, pub time: Option<String>, pub elapsed: Option<Duration>, pub duration: Option<Duration>, pub mixrampdb: f32, pub mixrampdelay: Option<u32>, pub state: State, pub bitrate: Option<u16>, pub xfade: Option<u32>, pub audio: Option<String>, pub updating_db: Option<u32>, pub error: Option<String>,
}
Expand description

Mpd status response

Fields§

§partition: Option<String>

Name of current partition

§volume: Option<u8>

Volume (0 - 100)

§repeat: bool§random: bool§single: String

0, 1 or Oneshot

§consume: bool§playlist: u32

Playlist version number

§playlistlength: u32§song: Option<u32>§songid: Option<u32>§nextsong: Option<u32>§nextsongid: Option<u32>§time: Option<String>§elapsed: Option<Duration>§duration: Option<Duration>§mixrampdb: f32§mixrampdelay: Option<u32>

mixrampdelay in seconds

§state: State

Player status

§bitrate: Option<u16>

Instantaneous bitrate in kbps

§xfade: Option<u32>

crossfade in seconds

§audio: Option<String>§updating_db: Option<u32>§error: Option<String>

Trait Implementations§

Source§

impl Debug for Status

Source§

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

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

impl<'de> Deserialize<'de> for Status

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Status> for WrappedResponse

Source§

fn from(s: Status) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Status

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Status

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Status

Auto Trait Implementations§

§

impl Freeze for Status

§

impl RefUnwindSafe for Status

§

impl Send for Status

§

impl Sync for Status

§

impl Unpin for Status

§

impl UnwindSafe for Status

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,