Crate screen_wake_lock

Crate screen_wake_lock 

Source
Expand description

screen-wake-lock: minimal cross-platform “keep screen awake” guard.

Usage:

let lock = screen_wake_lock::ScreenWakeLock::acquire("Playing video")?;
// keep running...
drop(lock); // screen can sleep again

Structs§

LinuxOptions
Options for Linux (ignored on Windows/macOS).
ScreenWakeLock
Guard that keeps the display from idling/sleeping while alive.

Enums§

Error
Error type for wake lock acquisition.