Crate nosleep

Crate nosleep 

Source
Expand description

Cross-platform library to block the power save functionality in the OS.

   let nosleep = NoSleep::new()?;
   nosleep.start(NoSleepType::PreventUserIdleDisplaySleep)?;
   // Depending on the platform, the block will hold
   // until either nosleep will be dropped (Linux)
   // or the process exits (macOS) or you manually
   // call `nosleep.stop()`

Structs§

NoSleep

Enums§

Error
NoSleepType

Type Aliases§

Result