tray-wrapper 0.4.0

A simple wrapper library to make it easy to run servers with a GUI tray icon
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::sync::Arc;
use tray_wrapper::{ContinueRunning, ServerGeneratorResult, create_tray_wrapper};

fn main() -> anyhow::Result<()> {
    fn sg() -> ServerGeneratorResult {
        let task = async { ContinueRunning::Exit };
        Box::pin(task)
    }

    create_tray_wrapper(
        include_bytes!("../examples/example_icon.png"),
        None,
        Arc::new(&sg),
    )?;

    Ok(())
}