logcontrol-zbus
zbus DBus frontend for the logcontrol interface.
Usage
$ cargo add logcontrol-zbus
async
zbus DBus frontend for the logcontrol interface.
$ cargo add logcontrol-zbus
#[async_std::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Use an implementation such as logcontrol-tracing
let control = create_log_control();
let _conn = zbus::ConnectionBuilder::session()?
.name("de.swsnr.logcontrol.SimpleServerExample")?
.serve_at(
logcontrol::DBUS_OBJ_PATH,
logcontrol_zbus::LogControl1::new(control),
)?
.build()
.await?;
// Do other things or go to wait forever
std::future::pending::<()>().await;
Ok(())
}