API reference

DeviceSelector Protocol

Extends Sendable
Protocol for selecting which device should be used for operations. Device selectors determine which available device should receive commands or stream data.

Signature

protocol DeviceSelector: Sendable

Properties

activeDevice : DeviceIdentifier?
[Get]
The currently active device identifier, if any.

Functions

activeDeviceStream ()
Creates a stream of active device changes.
Signature
public func activeDeviceStream() -> AnyAsyncSequence<DeviceIdentifier?>
Returns
AnyAsyncSequence<DeviceIdentifier?>