Enum insomnia::LockType[][src]

pub enum LockType {
    AutomaticSuspend,
    ManualSuspend,
    Screen,
}
Expand description

The type of power management operation to inhibit

Note that on some platforms, one variant of this enum may imply another. For instance, on Windows, it’s not possible to inhibit LockType::ManualSuspend without also inhibiting LockType::AutomaticSuspend.

Variants

AutomaticSuspend

Automatic suspension (managed by the system idle timer)

ManualSuspend

Manual suspension

Screen

Screensaver / Screen sleep

On Windows

A LockType::AutomaticSuspend must be taken in addition to a LockType::Screen to ensure the display stays on and the system does not enter sleep for the duration of the request.

Trait Implementations

The resulting type after applying the & operator.

Performs the & operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The underlying type used to store the bitset.

A mask of bits that are valid in the bitset.

Converts an enum of this type into its bit position.

Converts a bit position into an enum value.

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The resulting type after applying the - operator.

Performs the - operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.