[−][src]Trait insomnia::InhibitionManager
Common trait implemented by all platform-specific inhibition managers
Produces Lock
s, which inhibit specific power management operations.
Associated Types
Loading content...Required methods
fn lock(
&self,
types: EnumSet<LockType>,
who: &str,
why: &str
) -> Result<Self::Lock, Self::Error>
&self,
types: EnumSet<LockType>,
who: &str,
why: &str
) -> Result<Self::Lock, Self::Error>
Produces a new Lock
that inhibits the given operations
Parameters
types
: The types of operations to inhibitwho
: A human-readable description of the application that is obtaining the lockwhy
: The reason for obtaining the lock