pub struct DeviceDescription { /* private fields */ }Expand description
Describes an audio device with structured metadata.
This type provides structured information about an audio device beyond just its name. Availability depends on the host implementation and platform capabilities.
Implementations§
Source§impl DeviceDescription
impl DeviceDescription
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the human-readable device name.
This is always available and is the primary user-facing identifier.
Sourcepub fn manufacturer(&self) -> Option<&str>
pub fn manufacturer(&self) -> Option<&str>
Returns the manufacturer/vendor name if available.
Sourcepub fn device_type(&self) -> DeviceType
pub fn device_type(&self) -> DeviceType
Returns the device type categorization.
Sourcepub fn interface_type(&self) -> InterfaceType
pub fn interface_type(&self) -> InterfaceType
Returns the interface/connection type.
Sourcepub fn direction(&self) -> DeviceDirection
pub fn direction(&self) -> DeviceDirection
Returns the device direction.
Sourcepub fn supports_input(&self) -> bool
pub fn supports_input(&self) -> bool
Returns whether this device supports audio input (capture).
This is a convenience method that checks if direction is Input or Duplex.
Sourcepub fn supports_output(&self) -> bool
pub fn supports_output(&self) -> bool
Returns whether this device supports audio output (playback).
This is a convenience method that checks if direction is Output or Duplex.
Trait Implementations§
Source§impl Clone for DeviceDescription
impl Clone for DeviceDescription
Source§fn clone(&self) -> DeviceDescription
fn clone(&self) -> DeviceDescription
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 DeviceDescription
impl Debug for DeviceDescription
Source§impl Display for DeviceDescription
impl Display for DeviceDescription
Source§impl PartialEq for DeviceDescription
impl PartialEq for DeviceDescription
impl Eq for DeviceDescription
impl StructuralPartialEq for DeviceDescription
Auto Trait Implementations§
impl Freeze for DeviceDescription
impl RefUnwindSafe for DeviceDescription
impl Send for DeviceDescription
impl Sync for DeviceDescription
impl Unpin for DeviceDescription
impl UnsafeUnpin for DeviceDescription
impl UnwindSafe for DeviceDescription
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