logcontrol-zbus

Crates.iologcontrol-zbus
lib.rslogcontrol-zbus
version3.0.0
sourcesrc
created_at2023-09-30 11:59:13.661383
updated_at2024-11-01 18:24:39.585717
descriptionzbus-based DBus frontend for the logcontrol interface
homepagehttps://github.com/swsnr/logcontrol.rs
repositoryhttps://github.com/swsnr/logcontrol.rs.git
max_upload_size
id988588
size40,129
Sebastian Wiesner (swsnr)

documentation

https://docs.rs/logcontrol-zbus

README

logcontrol-zbus

Crates.io docs.rs

zbus DBus frontend for the logcontrol interface.

Usage

$ 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(())
}
Commit count: 84

cargo fmt