2 releases

Uses old Rust 2015

0.1.1 Feb 15, 2019
0.1.0 Nov 2, 2018

#16 in #dbus

Download history 6/week @ 2021-01-08 9/week @ 2021-01-15 14/week @ 2021-01-22 4/week @ 2021-01-29 8/week @ 2021-02-05 10/week @ 2021-02-12 10/week @ 2021-02-19 35/week @ 2021-02-26 21/week @ 2021-03-05 5/week @ 2021-03-12 15/week @ 2021-03-19 19/week @ 2021-03-26 9/week @ 2021-04-02 11/week @ 2021-04-09 36/week @ 2021-04-16 11/week @ 2021-04-23

109 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

~430KB