pub enum PlaybackError {
Show 16 variants
PlayerNotConnected,
StateNotInitialized,
QueueEmpty,
SourceError,
PlayerPlaying,
PlayerPaused,
PlayerStopped,
SeekNotSupported,
CannotGoPrevious,
CannotGoNext,
ShuffleNotSupported,
NoTrackAtIndex(usize),
RateOutOfRange,
FixedRate,
InvalidDuration,
DurationOverflow,
}Expand description
Error originating from the playback module of the daemon.
Variants§
PlayerNotConnected
The audio player is not connected.
This may happen if the device doesn’t have an audio device or none of the audio devices are marked as default.
StateNotInitialized
The playback state is not initialized.
This error may occur when a PlaybackCommand is sent to the daemon too early, before the
state is restored from cache.
QueueEmpty
The queue is empty.
SourceError
The audio file could not be opened, has an unsupported format or is corrupt.
PlayerPlaying
The player is already playing.
PlayerPaused
The player is already paused.
PlayerStopped
Thrown when a client attempts to stop the player when it was already stopped or when a client attempts to seek while the player is stopped.
SeekNotSupported
Seek is not supported for the current audio source.
CannotGoPrevious
Cannot go to the previous track.
This means that the current track is first in the queue and the loop state is
set to LoopState::Off.
CannotGoNext
Cannot go to the next track.
This means that the current track is last in the queue and the loop state is
set to LoopState::Off.
ShuffleNotSupported
The daemon was not built with shuffle support.
NoTrackAtIndex(usize)
No track at this index.
RateOutOfRange
The specified rate value was out of the allowed range.
FixedRate
The modification of the playback rate is not allowed.
InvalidDuration
The player position could not be set because the duration provided was invalid.
The player will refuse to seek by 0s to prevent audio popping.
DurationOverflow
Overflow detected while performing a seek operation.
Trait Implementations§
Source§impl Clone for PlaybackError
impl Clone for PlaybackError
Source§fn clone(&self) -> PlaybackError
fn clone(&self) -> PlaybackError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlaybackError
impl Debug for PlaybackError
Source§impl<'de> Deserialize<'de> for PlaybackError
impl<'de> Deserialize<'de> for PlaybackError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for PlaybackError
impl Display for PlaybackError
Source§impl Hash for PlaybackError
impl Hash for PlaybackError
Source§impl PartialEq for PlaybackError
impl PartialEq for PlaybackError
Source§fn eq(&self, other: &PlaybackError) -> bool
fn eq(&self, other: &PlaybackError) -> bool
self and other values to be equal, and is used by ==.