pub struct Host(/* private fields */);
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 moreAuto Trait Implementations§
impl RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl UnwindSafe for Host
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