pub struct Device { /* private fields */ }
Expand description
Struct wrapping an IMMDevice.
Implementations§
source§impl Device
impl Device
sourcepub fn get_iaudioclient(&self) -> Result<AudioClient, Box<dyn Error>>
pub fn get_iaudioclient(&self) -> Result<AudioClient, Box<dyn Error>>
Get an [IAudioClient] from an [IMMDevice]
sourcepub fn get_friendlyname(&self) -> Result<String, Box<dyn Error>>
pub fn get_friendlyname(&self) -> Result<String, Box<dyn Error>>
Read the friendly name of the endpoint device (for example, “Speakers (XYZ Audio Adapter)”)
sourcepub fn get_interface_friendlyname(&self) -> Result<String, Box<dyn Error>>
pub fn get_interface_friendlyname(&self) -> Result<String, Box<dyn Error>>
Read the friendly name of the audio adapter to which the endpoint device is attached (for example, “XYZ Audio Adapter”)
sourcepub fn get_description(&self) -> Result<String, Box<dyn Error>>
pub fn get_description(&self) -> Result<String, Box<dyn Error>>
Read the device description of the endpoint device (for example, “Speakers”)
sourcepub fn get_direction(&self) -> Direction
pub fn get_direction(&self) -> Direction
Get the direction for this Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl !Send for Device
impl !Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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