# 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.
## Usage
```rust
use std::error::Error;
use systemdzbus::{SystemCtl, ConnectionLevel};
async fn example_get_units() -> Result<(), Box::<dyn Error>> {
let mut systemctl = SystemCtl::new(ConnectionLevel::UserLevel);
systemctl.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.