#[non_exhaustive]pub enum CallbackInfo {
SourceEnded(PrefetchState),
NoSource,
PauseEnds(Instant),
PrefetchTime(Duration),
}Expand description
Callback type and asociated information
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SourceEnded(PrefetchState)
Invoked when the current source has reached end. Parameter specifies
status of prefetch. None means no prefetch was set, true means
successfull prefetch, false means that prefetch coululdn’t be set
because the configuration didn’t match.
NoSource
No source is available to play.
PauseEnds(Instant)
Invoked when no sound is playing and you can call hard_pause
PrefetchTime(Duration)
Prefetch time triggered. Only the given remaining playback time remains.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallbackInfo
impl RefUnwindSafe for CallbackInfo
impl Send for CallbackInfo
impl Sync for CallbackInfo
impl Unpin for CallbackInfo
impl UnwindSafe for CallbackInfo
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