pub struct PlayerSnapshot {
pub info: PlayerInfo,
pub now_playing: NowPlaying,
pub queue: Vec<QueuedTrackInfo>,
pub play_state: PlayState,
pub volume: Volume,
pub mute: MuteState,
pub repeat: RepeatMode,
pub shuffle: ShuffleMode,
}Expand description
A snapshot of a player’s state.
This snapshot allows full perusal of a player’s state without needing to continually await asynchronous locks.
Fields§
§info: PlayerInfoNon-mutable information about the player.
now_playing: NowPlayingState of the currently playing media.
queue: Vec<QueuedTrackInfo>The queue of tracks to play next.
play_state: PlayStateThe play state.
volume: VolumeThe volume level.
mute: MuteStateThe mute state.
repeat: RepeatModeThe repeat mode.
shuffle: ShuffleModeThe shuffle mode.
Trait Implementations§
Source§impl Clone for PlayerSnapshot
impl Clone for PlayerSnapshot
Source§fn clone(&self) -> PlayerSnapshot
fn clone(&self) -> PlayerSnapshot
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 moreAuto Trait Implementations§
impl Freeze for PlayerSnapshot
impl RefUnwindSafe for PlayerSnapshot
impl Send for PlayerSnapshot
impl Sync for PlayerSnapshot
impl Unpin for PlayerSnapshot
impl UnsafeUnpin for PlayerSnapshot
impl UnwindSafe for PlayerSnapshot
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