Expand description
Shared discovery policy: collection failures are terminal; entry metadata is best effort.
Enums§
- Process
Failure - Native process disappearance, distinguished from unreadable optional metadata.
Functions§
- collect
- Collect an inventory; a collection/count failure never becomes an empty success. Entries without a usable identity return Ok(None); optional metadata and format failures are absorbed explicitly by the adapter. Err always rejects the whole call.
- device_
format - Discovery format and its availability. Zero/zero is the explicit unavailable sentinel.
- device_
identity - Keep name-based IDs when readable; otherwise use a selectable native ID and unknown name. Entries with neither identity are omitted. The native query is lazy for named devices.
- device_
identity_ matches - Match either a name-based inventory ID or a native fallback, even after the name recovers.
- macos_
error_ failure - Classify a Core Audio property failure while retaining structured native status.
- macos_
process_ failure - macOS: kAudioHardwareBadObjectError (‘!obj’, 0x216f626a), ESRCH (3), and ENOENT (2) mean vanished. Other property/path errors mean unknown metadata.
- optional
- Optional property failures become explicit unknown values.
- process_
metadata - Interpret an optional process query: outer None means vanished; inner None means unknown. Used by adapters before the inventory collector, so unknown metadata keeps its PID.
- require_
device_ format - Checked opening retains the original typed cause and explains how to retry.
- selected_
output_ device - Validate the selected or default output device before device-scoped capture starts.
- windows_
error_ failure - Classify a Windows process failure from its retained native HRESULT.
- windows_
process_ failure - Windows: ERROR_INVALID_PARAMETER (87, HRESULT 0x80070057) means vanished. ERROR_ACCESS_DENIED (5, 0x80070005), and all other metadata errors, mean unknown.