pub struct PlaybackSnapshot {
pub phase: Phase,
pub position: Duration,
pub duration: Option<Duration>,
pub seekable: bool,
pub volume: f32,
pub muted: bool,
pub rate: f64,
pub audio_track: Option<i32>,
pub subtitle_track: Option<i32>,
}Expand description
Everything the UI consumes, read as one coherent value.
Deliberately a single snapshot rather than a dozen getters: reading position
and duration through separate calls is how a paused player reported
<position> / 0.0 when a file unloaded between them.
Fields§
§phase: Phase§position: Duration§duration: Option<Duration>None while unknown — a live stream, or an item still opening.
seekable: boolWhether seek can be expected to land. False for live edges.
volume: f320.0 – 1.0.
muted: bool§rate: f64§audio_track: Option<i32>§subtitle_track: Option<i32>Trait Implementations§
Source§impl Clone for PlaybackSnapshot
impl Clone for PlaybackSnapshot
Source§fn clone(&self) -> PlaybackSnapshot
fn clone(&self) -> PlaybackSnapshot
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 PlaybackSnapshot
impl Debug for PlaybackSnapshot
Auto Trait Implementations§
impl Freeze for PlaybackSnapshot
impl RefUnwindSafe for PlaybackSnapshot
impl Send for PlaybackSnapshot
impl Sync for PlaybackSnapshot
impl Unpin for PlaybackSnapshot
impl UnsafeUnpin for PlaybackSnapshot
impl UnwindSafe for PlaybackSnapshot
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.