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