Struct cpal::Host

source ·
pub struct Host(_);
Expand description

The platform’s dynamically dispatched Host type.

An instance of this Host type may represent one of the Hosts 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. HostIds may be acquired via the ALL_HOSTS const, and the available_hosts function.

Implementations§

The unique identifier associated with this host.

Returns a reference to the underlying platform specific implementation of this Host.

Returns a mutable reference to the underlying platform specific implementation of this Host.

Returns the underlying platform specific implementation of this Host.

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
The type used for enumerating available devices by the host.
The Device type yielded by the host.
Whether or not the host is available on the system.
An iterator yielding all Devices currently available to the host on the system. Read more
The default input audio device on the system. Read more
The default output audio device on the system. Read more
An iterator yielding all Devices currently available to the system that support one or more input stream formats. Read more
An iterator yielding all Devices currently available to the system that support one or more output stream formats. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.