[−][src]Struct logind_dbus::LoginManagerConnection
An established connection path for the login manager, through which the API is made accessible.
Methods
impl<'a> LoginManagerConnection<'a>
[src]
pub fn inhibit(
&self,
what: &str,
who: &str,
why: &str,
mode: &str
) -> Result<OwnedFd, Error>
[src]
&self,
what: &str,
who: &str,
why: &str,
mode: &str
) -> Result<OwnedFd, Error>
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
ordelay
.
Notes
A root user session cannot use systemd inhibitors.
pub fn inhibit_suspend(&self, who: &str, why: &str) -> Result<OwnedFd, Error>
[src]
Convenience method for inhibiting suspend.
Equivalent to connection.inhibit("idle:shutdown:sleep", who, why, "block")
.
Auto Trait Implementations
impl<'a> !Send for LoginManagerConnection<'a>
impl<'a> !Sync for LoginManagerConnection<'a>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,