pub enum Phase {
Idle,
Opening,
Ready,
Playing,
Paused,
Ended,
Failed(String),
}Expand description
What an engine is doing right now.
Opening is the state the previous design could not express, and is the
direct cause of DR-241: a seek that arrived while the engine had nothing
loaded had no phase to be queued against, so it was simply discarded and
playback began at zero.
Variants§
Idle
Nothing loaded. close() must reach this, and must be silent here.
Opening
An open is in flight. Position is not yet meaningful; a seek arriving
now must be honoured once the engine reaches Ready, never dropped.
Ready
Loaded and able to play, but not advancing.
Playing
Paused
Ended
Reached the end of the item by itself. Distinct from Idle, because
autoplay cares which one happened.
Failed(String)
Implementations§
Trait Implementations§
impl Eq for Phase
impl StructuralPartialEq for Phase
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnsafeUnpin for Phase
impl UnwindSafe for Phase
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more