nosleep_types/lib.rs
1#[cfg(feature = "serde")]
2use serde::{Deserialize, Serialize};
3
4#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6pub enum NoSleepType {
7 /// Prevents the display from dimming automatically.
8 /// For example: playing a video.
9 PreventUserIdleDisplaySleep,
10 /// Prevents the system from sleeping automatically due to a lack of user activity.
11 /// For example: downloading a file in the background.
12 PreventUserIdleSystemSleep,
13}