systemdzbus 0.1.5

Interact with systemd through DBus with a convenient rust interface. All of the initial types were automatically generated by the CLI tool 'zbus-xmlgen'. From here I just copied the documentation from the systemd man page to get good descriptions for each function.
Documentation

Systemdzbus

Interact with systemd through DBus with a convenient rust interface. The manager proxy types were generated by 'zbus-xmlgen'. From here I just copied the documentation from the systemd man page to get good descriptions for each function.

The plan is to wrap all useful functionality in nice to use types. For now, what I have done is I have wrapped some of the most used systemctl functions into the wrapper and added very simple type conversions.

Usage

use std::error::Error;
use systemdzbus::SystemCtlBuilder;

async fn example_get_units() -> Result<(), Box::<dyn Error>> {
    let systemctl = SystemCtlBuilder::new()
        // You may want to have access to the system bus instead of only the user bus
        .with_system_connection_level()
        .init()
        .await?;

    let units = systemctl.list_units().await?;

    assert!(!units.is_empty());

    Ok(())
}

Purpose

The entire use of this project was for me to get better documentation for the automatic types generated by 'zbus-xmlgen' and to have a nice interface on top of the raw manager proxy.