pub enum AudioError {
DeviceNotFound,
InitializationFailed(String),
ListFailed(String),
GetVolumeFailed(String),
SetVolumeFailed(String),
GetMuteFailed(String),
SetMuteFailed(String),
Unsupported,
EndpointLockPoisoned,
}Expand description
Error type for all volumecontrol operations.
Variants§
DeviceNotFound
The requested device was not found.
InitializationFailed(String)
The audio subsystem could not be initialized.
ListFailed(String)
Listing available devices failed.
GetVolumeFailed(String)
Reading the current volume level failed.
SetVolumeFailed(String)
Changing the volume level failed.
GetMuteFailed(String)
Reading the mute state failed.
SetMuteFailed(String)
Changing the mute state failed.
Unsupported
The operation is not supported on the current platform.
EndpointLockPoisoned
A mutex protecting a platform audio endpoint was poisoned (a thread panicked while holding the lock). The endpoint state may be inconsistent; callers should discard the device and re-acquire it.
Trait Implementations§
Source§impl Debug for AudioError
impl Debug for AudioError
Source§impl Display for AudioError
impl Display 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()
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