# Systemdzbus
Interact with systemd through DBus with a convenient rust interface.
All of the code was 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.
## Usage
To find out more about how to use the Connection, see the [zbus library](https://docs.rs/zbus/latest/zbus/).
```rust
use systemdzbus::{Connection, manager::ManagerProxy};
async fn example_get_units() -> Result<()> {
/// Create zbus connection. You can also use Connection::session() here.
let connection = Connection::system().await?;
/// Create proxy per zbus
let proxy = ManagerProxy::new(&connection).await?;
/// Use the methods on the proxy. These are the ones
/// that are actually documented here
let res = proxy.list_units().await?;
assert!(res.len() > 0);
Ok(())
}
```
Because this is literally just the [zbus library](https://docs.rs/zbus/latest/zbus/), and I contributed
absolutely nothing special, I think it is async runtime agnostic.
I don't know, I've used smol and tokio.
## Purpose
The entire use of this project was for me to get documentation for the automatic
types generated by 'zbus-xmlgen'. I got tired of reading through the man pages,
so I brought the man pages into the function definitions.