pub struct Device {
pub id: String,
pub name: String,
pub is_default: bool,
}Expand description
An input the host can offer a user, and record from.
Fields§
§id: StringStable identity, and the value a host persists. cpal documents
this as the thing to store and re-resolve, which is why the
selection is keyed on it rather than on name: names collide
between two identical interfaces and change when a user renames
one, and neither should silently move the recording.
name: StringHuman label for a picker. Not an identity.
is_default: boolWhether the system would pick this one when asked for no particular device.
Trait Implementations§
impl Eq for Device
impl StructuralPartialEq for 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 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