#[non_exhaustive]pub enum DeviceType {
Speaker,
Microphone,
Headphones,
Headset,
Earpiece,
Handset,
HearingAid,
Dock,
Tuner,
Virtual,
Unknown,
}Expand description
Categorization of audio device types.
This describes the kind of audio device (speaker, microphone, headset, etc.) regardless of how it connects to the system.
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.
Speaker
Speaker (built-in or external)
Microphone
Microphone (built-in or external)
Headphones
Headphones (audio output only)
Headset
Headset (combined headphones + microphone)
Earpiece
Earpiece (phone-style speaker, typically for voice calls)
Handset
Handset (telephone-style handset with speaker and microphone)
HearingAid
Hearing aid device
Dock
Docking station audio
Tuner
Radio/TV tuner
Virtual
Virtual/loopback device (software audio routing)
Unknown
Unknown or unclassified device type
Trait Implementations§
Source§impl Clone for DeviceType
impl Clone for DeviceType
Source§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
Returns a duplicate of the value. Read more
1.0.0 · 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 DeviceType
impl Debug for DeviceType
Source§impl Default for DeviceType
impl Default for DeviceType
Source§fn default() -> DeviceType
fn default() -> DeviceType
Returns the “default value” for a type. Read more
Source§impl Display for DeviceType
impl Display for DeviceType
Source§impl Hash for DeviceType
impl Hash for DeviceType
Source§impl PartialEq for DeviceType
impl PartialEq for DeviceType
impl Copy for DeviceType
impl Eq for DeviceType
impl StructuralPartialEq for DeviceType
Auto Trait Implementations§
impl Freeze for DeviceType
impl RefUnwindSafe for DeviceType
impl Send for DeviceType
impl Sync for DeviceType
impl Unpin for DeviceType
impl UnsafeUnpin for DeviceType
impl UnwindSafe for DeviceType
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