Skip to main content

Crate zbus_systemd

Crate zbus_systemd 

Source
Expand description

A pure-Rust library to interact with systemd DBus services.

§Async executor

This library internally uses zbus without any default Cargo features.

That means that you have to decide which async executor to use, by enabling one of the following Cargo features:

  • zbus-async-smol: internally uses the smol executor (enabling the async-io feature in zbus).
  • zbus-async-tokio: internally uses the tokio executor (enabling the tokio feature in zbus).

§Auto-generated services

Each service has its own dedicated module, which is auto-generated from current systemd definitions and can be activated through the corresponding Cargo feature:

  • home1: systemd-homed interfaces
  • hostname1: systemd-hostnamed interfaces
  • import1: systemd-importd interfaces
  • locale1: systemd-localed interfaces
  • login1: systemd-logind interfaces
  • machine1: systemd-machined interfaces
  • network1: systemd-networkd interfaces
  • oom1: systemd-oomd interfaces
  • portable1: systemd-portabled interfaces
  • resolve1: systemd-resolved interfaces
  • systemd1: systemd interfaces
  • sysupdate1: systemd-sysupdated interfaces
  • timedate1: systemd-timedated interfaces
  • timesync1: systemd-timesyncd interfaces

Re-exports§

pub use zbus;
pub use zbus::names as znames;
pub use zbus::zvariant;

Modules§

home1home1
D-Bus interface for systemd-homed (org.freedesktop.home1).
hostname1hostname1
D-Bus interface for systemd-hostnamed (org.freedesktop.hostname1).
import1import1
D-Bus interface for systemd-importd (org.freedesktop.import1).
locale1locale1
D-Bus interface for systemd-localed (org.freedesktop.locale1).
login1login1
D-Bus interface for systemd-logind (org.freedesktop.login1).
machine1machine1
D-Bus interface for systemd-machined (org.freedesktop.machine1).
network1network1
D-Bus interface for systemd-networkd (org.freedesktop.network1).
oom1oom1
D-Bus interface for systemd-oomd (org.freedesktop.oom1).
portable1portable1
D-Bus interface for systemd-portabled (org.freedesktop.portable1).
resolve1resolve1
D-Bus interface for systemd-resolved (org.freedesktop.resolve1).
systemd1systemd1
D-Bus interface for systemd (org.freedesktop.systemd1).
sysupdate1sysupdate1
D-Bus interface for systemd-sysupdated (org.freedesktop.sysupdate1).
timedate1timedate1
D-Bus interface for systemd-timedated (org.freedesktop.timedate1).
timesync1timesync1
D-Bus interface for systemd-timesyncd (org.freedesktop.timesync1).

Functions§

bus_label_escape
Escape a label for use in a D-Bus object path.
bus_label_unescape
Unescape a label from a D-Bus object path.
bus_path_decode
Convert an object path into an external identifier.
bus_path_encode
Convert an external identifier into an object path.
unit_name_escape
Escape a unit name
unit_name_unescape
Unescape a unit name