#[repr(C)]pub struct PlaybackState {
pub position_s: f32,
pub duration_s: f32,
pub volume: f32,
pub playing: bool,
pub muted: bool,
}Expand description
What a media node’s playback looks like right now.
Field order is by descending alignment (the f32s, then the bools):
the repo’s alignment-order check is a hard error, and a bool wedged
between two f32s is what trips it.
Fields§
§position_s: f32Playback position, in seconds from the start.
duration_s: f32Total length in seconds, or 0.0 when it is not known yet (a live
stream, or metadata that has not arrived). An unknown duration means
playback never reaches an end, so Ended cannot fire.
volume: f32Output gain, 0.0..=1.0.
playing: boolWhether the transport is running.
muted: boolMuted independently of volume, exactly as the web models it - so
unmuting restores the level the user had chosen.
Implementations§
Source§impl PlaybackState
impl PlaybackState
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 moreimpl Copy for PlaybackState
Source§impl Debug for PlaybackState
impl Debug for PlaybackState
Source§impl Default for PlaybackState
impl Default for PlaybackState
Source§impl PartialEq for PlaybackState
impl PartialEq for PlaybackState
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