Crates.io | logcontrol-zbus |
lib.rs | logcontrol-zbus |
version | 3.0.0 |
source | src |
created_at | 2023-09-30 11:59:13.661383 |
updated_at | 2024-11-01 18:24:39.585717 |
description | zbus-based DBus frontend for the logcontrol interface |
homepage | https://github.com/swsnr/logcontrol.rs |
repository | https://github.com/swsnr/logcontrol.rs.git |
max_upload_size | |
id | 988588 |
size | 40,129 |
zbus
DBus frontend for the logcontrol interface.
$ cargo add logcontrol-zbus
use logcontrol_zbus::ConnectionBuilderExt;
#[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_log_control(logcontrol_zbus::LogControl1::new(control))?
.build()
.await?;
// Do other things or go to wait forever
std::future::pending::<()>().await;
Ok(())
}