Skip to main content

Module inventory

Module inventory 

Source
Expand description

Shared discovery policy: collection failures are terminal; entry metadata is best effort.

Enums§

ProcessFailure
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.