pub struct Host(_);
Expand description
The platform’s dynamically dispatched Host
type.
An instance of this Host
type may represent one of the Host
s available
on the platform.
Use this type if you require switching between available hosts at runtime.
This type may be constructed via the host_from_id
function. HostId
s may
be acquired via the ALL_HOSTS
const, and the available_hosts
function.
Implementations§
source§impl Host
impl Host
sourcepub fn as_inner(&self) -> &HostInner
pub fn as_inner(&self) -> &HostInner
Returns a reference to the underlying platform specific implementation of this
Host
.
sourcepub fn as_inner_mut(&mut self) -> &mut HostInner
pub fn as_inner_mut(&mut self) -> &mut HostInner
Returns a mutable reference to the underlying platform specific implementation of
this Host
.
sourcepub fn into_inner(self) -> HostInner
pub fn into_inner(self) -> HostInner
Returns the underlying platform specific implementation of this Host
.
Trait Implementations§
source§impl HostTrait for Host
impl HostTrait for Host
source§fn is_available() -> bool
fn is_available() -> bool
Whether or not the host is available on the system.
source§fn default_input_device(&self) -> Option<Self::Device>
fn default_input_device(&self) -> Option<Self::Device>
The default input audio device on the system. Read more
source§fn default_output_device(&self) -> Option<Self::Device>
fn default_output_device(&self) -> Option<Self::Device>
The default output audio device on the system. Read more
source§fn input_devices(&self) -> Result<InputDevices<Self::Devices>, DevicesError>
fn input_devices(&self) -> Result<InputDevices<Self::Devices>, DevicesError>
An iterator yielding all
Device
s currently available to the system that support one or more
input stream formats. Read moresource§fn output_devices(&self) -> Result<OutputDevices<Self::Devices>, DevicesError>
fn output_devices(&self) -> Result<OutputDevices<Self::Devices>, DevicesError>
An iterator yielding all
Device
s currently available to the system that support one or more
output stream formats. Read more