systemdzbus 0.1.3

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.
Documentation
//!# 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.
//! # D-Bus interface proxy for: `org.freedesktop.systemd1.Manager`
//!
//! This code was generated by `zbus-xmlgen` `5.1.0` from D-Bus introspection data.
//! Source: `Interface '/org/freedesktop/systemd1' from service 'org.freedesktop.systemd1' on system bus`.
//!
//! More information can be found in the [Writing a client proxy] section of the zbus
//! documentation.
//!
//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the
//! following zbus API can be used:
//!
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,

pub mod manager;

pub use manager::ManagerProxy;
pub use zbus::Connection;


#[cfg(test)]
mod tests {
    use std::error::Error;
    use zbus::Connection;
    use crate::manager::ManagerProxy;

    #[test]
    fn can_list_units() {
        let res: Result<(), Box<dyn Error>> = smol::block_on(async {
            let connection = Connection::system().await?;
            let proxy = ManagerProxy::new(&connection).await?;
            let res = proxy.list_units().await?;

            assert!(res.len() > 0);
            Ok(())
        });

        assert!(res.is_ok());
    }
}