server-less 0.6.0

Composable derive macros for common Rust patterns
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use server_less::cli;

#[derive(Clone)]
struct MySvc;

#[cli(name = "my-svc", no_sync)]
impl MySvc {
    pub async fn run(&self) -> String {
        "ran".to_string()
    }
}

fn main() {
    let svc = MySvc;
    // cli_run_with should not exist on a no_sync service
    svc.cli_run_with(["my-svc", "run"]).unwrap();
}