pub enum AudioError {
Underrun,
Closed,
FormatMismatch {
expected: AudioFormat,
got: AudioFormat,
},
Device(String),
}Expand description
Why an AudioSource/AudioSink (or an underlying backend I/O) failed.
Variants§
Underrun
The sink starved — no audio was ready when the device needed it.
Closed
The device or stream is closed; no more audio can flow.
FormatMismatch
A chunk’s format did not match the sink’s format. The sink does not resample: the caller must feed it chunks in the sink’s own format.
Fields
§
expected: AudioFormatThe format the sink accepts (its own AudioSink::format).
§
got: AudioFormatThe format of the rejected chunk.
Device(String)
A device- or backend-level failure, with a human-readable description.
Trait Implementations§
Source§impl Clone for AudioError
impl Clone for AudioError
Source§fn clone(&self) -> AudioError
fn clone(&self) -> AudioError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioError
impl Debug for AudioError
Source§impl Display for AudioError
impl Display for AudioError
impl Eq for AudioError
Source§impl Error for AudioError
impl Error for AudioError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for AudioError
impl PartialEq for AudioError
impl StructuralPartialEq for AudioError
Auto Trait Implementations§
impl Freeze for AudioError
impl RefUnwindSafe for AudioError
impl Send for AudioError
impl Sync for AudioError
impl Unpin for AudioError
impl UnsafeUnpin for AudioError
impl UnwindSafe for AudioError
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