2 releases

0.1.1 Feb 15, 2019
0.1.0 Nov 2, 2018

#10 in #dbus

Download history 7/week @ 2019-11-28 22/week @ 2019-12-05 10/week @ 2019-12-12 7/week @ 2019-12-19 2/week @ 2019-12-26 2/week @ 2020-01-02 10/week @ 2020-01-09 14/week @ 2020-01-16 1/week @ 2020-01-23 1/week @ 2020-01-30 4/week @ 2020-02-06 5/week @ 2020-02-13 5/week @ 2020-02-20 8/week @ 2020-02-27 9/week @ 2020-03-05 6/week @ 2020-03-12

69 downloads per month

MIT license

5KB

logind-dbus

Rust crate that provides a DBus API for interacting with logind, which is useful for doing things such as inhibiting suspension.

extern crate logind_dbus;
use logind_dbus::LoginManager;

pub fn main() -> io::Result<()> {
    let login_manager = LoginManager::new()?;
    let suspend_lock = login_manager.connect().inhibit_suspend()?;
    /// Do sensitive thing with the guarantee that suspend will not work.
}

lib.rs:

Provides a DBus API for interacting with logind, which is useful for doing things such as inhibiting suspension.

extern crate logind_dbus;
use logind_dbus::LoginManager;

pub fn main() -> io::Result<()> {
    let login_manager = LoginManager::new()?;
    let suspend_lock = login_manager.connect().inhibit_suspend()?;
    /// Do sensitive thing with the guarantee that suspend will not work.
}

Dependencies

~495KB