set_policy

Function set_policy 

Source
pub unsafe fn set_policy(
    policy: ove_pm_policy_fn,
    user_data: *mut c_void,
) -> Result<()>
Expand description

Register a custom power policy callback. Pass None to restore default.

ยงSafety

The callback and user_data must remain valid for the lifetime of the registration.