pub fn keep_awake(enabled: Option<bool>) -> Result<bool, KeepAwakeError>Expand description
Reads the live state, optionally enabling or disabling it for the whole application process.
Call with Some(false) during normal app shutdown. The child also watches this process so
a crash cannot leave sleep prevention running. State is never persisted.
ยงErrors
Returns an error if process supervision fails or the platform does not support Keep Awake.