pub struct PlaybackState {
pub device: Option<Device>,
pub repeat_state: Option<RepeatState>,
pub shuffle_state: Option<bool>,
pub context: Option<Context>,
pub timestamp: u64,
pub progress_ms: Option<u32>,
pub is_playing: bool,
pub item: Option<PlayableItem>,
pub currently_playing_type: CurrentlyPlayingType,
pub actions: Actions,
}Expand description
The current user’s playback state.
Fields§
§device: Option<Device>The currently active device.
repeat_state: Option<RepeatState>The repeat state.
shuffle_state: Option<bool>Whether or not shuffle is enabled.
context: Option<Context>The context the item is being played from. (e.g. arist, playlist, album or show.
timestamp: u64A Unix timestamp of when the playback state was last changed.
progress_ms: Option<u32>The playback position in miliseconds.
is_playing: boolWhether or not the user is playing something.
item: Option<PlayableItem>The currently playing item - a track or episode.
currently_playing_type: CurrentlyPlayingTypeThe type of the currently playing item. It may have more variants than item.
actions: ActionsAllows to update the user interface based on which playback actions are currently available.
Trait Implementations§
Source§impl Clone for PlaybackState
impl Clone for PlaybackState
Source§fn clone(&self) -> PlaybackState
fn clone(&self) -> PlaybackState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PlaybackState
impl Debug for PlaybackState
Source§impl<'de> Deserialize<'de> for PlaybackState
impl<'de> Deserialize<'de> for PlaybackState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for PlaybackState
impl PartialEq for PlaybackState
Source§fn eq(&self, other: &PlaybackState) -> bool
fn eq(&self, other: &PlaybackState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PlaybackState
Auto Trait Implementations§
impl Freeze for PlaybackState
impl RefUnwindSafe for PlaybackState
impl Send for PlaybackState
impl Sync for PlaybackState
impl Unpin for PlaybackState
impl UnsafeUnpin for PlaybackState
impl UnwindSafe for PlaybackState
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