pub struct MprisSnapshot {
pub progress: Option<f32>,
pub title: Option<String>,
pub player_name: Option<String>,
}Expand description
Snapshot of the currently-active MPRIS player’s track position.
Fields§
§progress: Option<f32>[0, 1] position within the current track, derived from
Position / mpris:length. None when no player is reachable,
when the player is stopped, or when the metadata exposes a
zero / missing mpris:length (some web players don’t publish
duration for live streams).
title: Option<String>xesam:title of the current track, if exposed. Surfaced so a
future HUD / message overlay can render the song title without
re-opening its own D-Bus connection.
player_name: Option<String>D-Bus name of the player we last read from (e.g.,
org.mpris.MediaPlayer2.spotify). Useful for diagnostics.
Trait Implementations§
Source§impl Clone for MprisSnapshot
impl Clone for MprisSnapshot
Source§fn clone(&self) -> MprisSnapshot
fn clone(&self) -> MprisSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MprisSnapshot
impl Debug for MprisSnapshot
Source§impl Default for MprisSnapshot
impl Default for MprisSnapshot
Source§fn default() -> MprisSnapshot
fn default() -> MprisSnapshot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MprisSnapshot
impl RefUnwindSafe for MprisSnapshot
impl Send for MprisSnapshot
impl Sync for MprisSnapshot
impl Unpin for MprisSnapshot
impl UnwindSafe for MprisSnapshot
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> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().