[][src]Trait insomnia::InhibitionManager

pub trait InhibitionManager {
    type Error: Error;
    type Lock: Lock;
    fn lock(
        &self,
        types: EnumSet<LockType>,
        who: &str,
        why: &str
    ) -> Result<Self::Lock, Self::Error>; }

Common trait implemented by all platform-specific inhibition managers

Produces Locks, which inhibit specific power management operations.

Associated Types

type Error: Error

type Lock: Lock

Loading content...

Required methods

fn lock(
    &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 inhibit
  • who: A human-readable description of the application that is obtaining the lock
  • why: The reason for obtaining the lock
Loading content...

Implementors

impl InhibitionManager for InhibitionManager[src]

type Error = Error

type Lock = Lock

Loading content...