pub struct LoginManagerConnection<'a> { /* private fields */ }
Expand description

An established connection path for the login manager, through which the API is made accessible.

Implementations

Inhibit is the only API necessary to take a lock. It takes four arguments:

  • What is a colon-separated list of lock types, i.e. shutdown, sleep, idle, handle-power-key, handle-suspend-key, handle-hibernate-key, handle-lid-switch. Example: “shutdown:idle”
  • Who is a human-readable, descriptive string of who is taking the lock. Example: “Package Updater”
  • Why is a human-readable, descriptive string of why the lock is taken. Example: “Package Update in Progress”
  • Mode is one of block or delay.
Notes

A root user session cannot use systemd inhibitors.

Convenience method for inhibiting suspend.

Equivalent to connection.inhibit("idle:shutdown:sleep", who, why, "block").

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.