1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//!# 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 use ManagerProxy;
pub use Connection;