pub struct PlayoutDeviceId(/* private fields */);Expand description
Unique identifier for a playout (speaker) device.
This is a type-safe wrapper around the platform-specific device GUID.
Obtain this from PlayoutDeviceInfo returned by PlatformAudio::playout_devices().
§Platform Notes
- Desktop (Windows, macOS, Linux): Contains a unique GUID that persists across device hot-plug events. Use this for reliable device selection.
- Android: Always empty. Android doesn’t provide device GUIDs and only reports
a single “default” device. Audio routing (speaker, earpiece, Bluetooth) is handled
by the system via
AudioManager, not through WebRTC device selection.
§Example
ⓘ
let audio = PlatformAudio::new()?;
for device in audio.playout_devices() {
println!("{}: {}", device.name, device.id);
// Save device.id for later use (desktop only)
}Implementations§
Trait Implementations§
Source§impl Clone for PlayoutDeviceId
impl Clone for PlayoutDeviceId
Source§fn clone(&self) -> PlayoutDeviceId
fn clone(&self) -> PlayoutDeviceId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PlayoutDeviceId
impl Debug for PlayoutDeviceId
Source§impl Display for PlayoutDeviceId
impl Display for PlayoutDeviceId
impl Eq for PlayoutDeviceId
Source§impl Hash for PlayoutDeviceId
impl Hash for PlayoutDeviceId
Source§impl PartialEq for PlayoutDeviceId
impl PartialEq for PlayoutDeviceId
impl StructuralPartialEq for PlayoutDeviceId
Auto Trait Implementations§
impl Freeze for PlayoutDeviceId
impl RefUnwindSafe for PlayoutDeviceId
impl Send for PlayoutDeviceId
impl Sync for PlayoutDeviceId
impl Unpin for PlayoutDeviceId
impl UnsafeUnpin for PlayoutDeviceId
impl UnwindSafe for PlayoutDeviceId
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.