#[non_exhaustive]pub enum ErrorCode {
DeviceLost,
DeviceBusy,
NoPermission,
NoDevice,
UnsupportedConfig,
InvalidConfig,
Backend,
}Expand description
What went wrong, as a stable code. The string forms
(ErrorCode::as_str) are part of the public API.
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.
DeviceLost
A device in use went away (unplugged, disabled, or its stream died).
DeviceBusy
The device is in use by something else, or temporarily unavailable.
NoPermission
The OS refused access: the person declined or turned off microphone
access, policy forbids it, or (macOS) the app has no
NSMicrophoneUsageDescription so the OS can’t ask. No input device is
open. The engine opens one by itself if access is granted later.
NoDevice
No such device, or no device of that kind at all.
UnsupportedConfig
The device can’t run any configuration we can use.
InvalidConfig
The configuration passed in is invalid.
Backend
Anything else from the audio backend.
Implementations§
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Forget for ErrorCode
impl Freeze for ErrorCode
impl Move for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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