#[non_exhaustive]pub struct Device {
pub id: String,
pub name: String,
pub default: bool,
pub host: String,
}Expand description
An audio output reported by devices.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringOpaque identifier: pass to Config::device or
Engine::switch. Stable across runs and
reboots where the host API can manage it.
name: StringHuman-readable name, e.g. “Built-in Output”.
default: boolWhether this is the system default output.
True for at most one device: the preferred host’s default. Another host’s default is that host’s, not the system’s.
host: StringThe host API this device is reached through, e.g. “PipeWire” or “ALSA”.
The same hardware is usually reachable through several, so a caller that offers a choice groups by this.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin 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