Struct mpris::ProgressTick

source ·
pub struct ProgressTick<'a> {
    pub player_quit: bool,
    pub progress_changed: bool,
    pub track_list_changed: bool,
    pub progress: &'a Progress,
    pub track_list: Option<&'a TrackList>,
}
Expand description

Return value of ProgressTracker::tick, which gives details about the latest refresh.

Fields§

§player_quit: bool

true if Player quit. This likely means that the player is no longer running.

If the player is no longer running, then fetching new data will not be possible, so they will all be reused (progress_changed and track_list_changed should all be false).

§progress_changed: bool

true if Progress data changed (beyond the calculated position)

Examples:

  • Playback status changed
  • Metadata changed for the track
  • Volume was decreased
§track_list_changed: bool

true if TrackList data changed. This will always be false if player does not support track lists.

Examples:

  • Track was added
  • Track was removed
  • Metadata changed for a track
§progress: &'a Progress

The current Progress from the ProgressTracker. progress_changed tells you if this was reused from the last tick or if it’s a new one.

§track_list: Option<&'a TrackList>

The current TrackList from the ProgressTracker. track_list_changed tells you if this was changed since the last tick.

Trait Implementations§

source§

impl<'a> Debug for ProgressTick<'a>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for ProgressTick<'a>

§

impl<'a> !Send for ProgressTick<'a>

§

impl<'a> !Sync for ProgressTick<'a>

§

impl<'a> Unpin for ProgressTick<'a>

§

impl<'a> !UnwindSafe for ProgressTick<'a>

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, 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.