Skip to main content

check_capability_with_overrides

Function check_capability_with_overrides 

Source
pub fn check_capability_with_overrides(
    cap: PlatformCapability,
    overrides: Option<&HashMap<PlatformCapability, CapabilityStatus>>,
) -> CapabilityStatus
Expand description

Check a platform capability, consulting an overrides map first.

If overrides contains the capability, its value is returned immediately. Otherwise the real system is probed. This is the primary entry point for tests that need deterministic results without global state.