1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Cross-platform library to block the
//! power save functionality in the OS.
//!
//! ```rust
//! # use std::error::Error;
//! # use std::{time::Duration, thread};
//! # use nosleep::*;
//! # fn main() -> Result<(), Box<dyn Error>> {
//! let nosleep = NoSleep::new().unwrap();
//! let handle = nosleep.start(NoSleepType::PreventUserIdleDisplaySleep)?;
//! // Depending on the platform, the block will hold
//! // until either nosleep will be dropped (Linux)
//! // or the process exits (macOS)
//! # Ok(())
//! # }
//! ```
pub use NoSleepType;
pub use *;
pub use *;
pub use *;