#[non_exhaustive]pub enum AudioDecodeError {
Decode(Error),
Convert(ConvertError),
}Expand description
Errors from [FfmpegAudioStreamDecoder] — faults only.
Both arms are real failures. The drain’s other two answers never
reached this type even before they had names: they rode in as
Decode(Ffmpeg(Other { errno: EAGAIN })) and
Decode(Ffmpeg(Eof)), which a generic consumer had no way to
recognise. They are Received states now.
Open fault taxonomy, so it is #[non_exhaustive]. New ways to
fail are discovered — a backend, a ceiling, a corruption a codec
learns to report — and a consumer that meets one it has never heard
of should take its generic-fault path. That is exactly what the
wildcard arm this attribute forces is for. The two status
vocabularies opposite it,
Sent and Received,
are exhaustive for the mirror-image reason: their arms are the
substrate’s fixed state set, and there the wildcard would be dead
weight hiding a state a consumer forgot.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Decode(Error)
The wrapped ffmpeg::decoder::Audio reported an error.
Convert(ConvertError)
Conversion from FFmpeg’s AVFrame to mediadecode’s AudioFrame
failed.
Implementations§
Source§impl AudioDecodeError
impl AudioDecodeError
Sourcepub fn unwrap_decode(self) -> Error
pub fn unwrap_decode(self) -> Error
Unwraps this value to the AudioDecodeError::Decode variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_decode_ref(&self) -> &Error
pub fn unwrap_decode_ref(&self) -> &Error
Unwraps this reference to the AudioDecodeError::Decode variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_decode_mut(&mut self) -> &mut Error
pub fn unwrap_decode_mut(&mut self) -> &mut Error
Unwraps this mutable reference to the AudioDecodeError::Decode variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_convert(self) -> ConvertError
pub fn unwrap_convert(self) -> ConvertError
Unwraps this value to the AudioDecodeError::Convert variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_convert_ref(&self) -> &ConvertError
pub fn unwrap_convert_ref(&self) -> &ConvertError
Unwraps this reference to the AudioDecodeError::Convert variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_convert_mut(&mut self) -> &mut ConvertError
pub fn unwrap_convert_mut(&mut self) -> &mut ConvertError
Unwraps this mutable reference to the AudioDecodeError::Convert variant.
Panics if this value is of any other type.
Source§impl AudioDecodeError
impl AudioDecodeError
Sourcepub fn try_unwrap_decode(self) -> Result<Error, TryUnwrapError<Self>>
pub fn try_unwrap_decode(self) -> Result<Error, TryUnwrapError<Self>>
Attempts to unwrap this value to the AudioDecodeError::Decode variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_decode_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
pub fn try_unwrap_decode_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the AudioDecodeError::Decode variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_decode_mut(
&mut self,
) -> Result<&mut Error, TryUnwrapError<&mut Self>>
pub fn try_unwrap_decode_mut( &mut self, ) -> Result<&mut Error, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the AudioDecodeError::Decode variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_convert(self) -> Result<ConvertError, TryUnwrapError<Self>>
pub fn try_unwrap_convert(self) -> Result<ConvertError, TryUnwrapError<Self>>
Attempts to unwrap this value to the AudioDecodeError::Convert variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_convert_ref(
&self,
) -> Result<&ConvertError, TryUnwrapError<&Self>>
pub fn try_unwrap_convert_ref( &self, ) -> Result<&ConvertError, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the AudioDecodeError::Convert variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_convert_mut(
&mut self,
) -> Result<&mut ConvertError, TryUnwrapError<&mut Self>>
pub fn try_unwrap_convert_mut( &mut self, ) -> Result<&mut ConvertError, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the AudioDecodeError::Convert variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
Source§impl Clone for AudioDecodeError
impl Clone for AudioDecodeError
Source§fn clone(&self) -> AudioDecodeError
fn clone(&self) -> AudioDecodeError
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 AudioDecodeError
impl Debug for AudioDecodeError
Source§impl Display for AudioDecodeError
impl Display for AudioDecodeError
Source§impl Error for AudioDecodeError
impl Error for AudioDecodeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()