pub enum PlayerEvent {
TrackStarted,
Progress {
elapsed: Duration,
total: Option<Duration>,
},
AboutToFinish,
TrackAdvanced,
TrackEnded,
Error(String),
}Expand description
Events sent from the player thread back to the TUI.
Variants§
TrackStarted
Progress
Fired every ~500 ms. total is None when unknown.
AboutToFinish
Fired ~5 s before the current track ends. The TUI should respond with
PlayerCommand::EnqueueNext to enable gapless playback.
TrackAdvanced
Fired when a gaplessly enqueued track begins playing (elapsed resets).
TrackEnded
Error(String)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlayerEvent
impl RefUnwindSafe for PlayerEvent
impl Send for PlayerEvent
impl Sync for PlayerEvent
impl Unpin for PlayerEvent
impl UnsafeUnpin for PlayerEvent
impl UnwindSafe for PlayerEvent
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