INNER CODE UNIT · Rust
host
RustAudio/cpal · src/lib.rs:297
pub fn host(&self) -> crate::platform::HostId {
self.0
}
/// Returns the backend-specific device identifier string.
pub fn id(&self) -> &str {
&self.1
}
}
impl std::fmt::Display for DeviceId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}:{}", self.host(), self.id())
}
}
impl std::str::FromStr for DeviceId {
type Err = Error;