aboutsummaryrefslogtreecommitdiff
path: root/examples/example-implicit-dispatcher/src/main.rs
blob: 89a5ec35e972cd49199b78b65810ef6948f6c965 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Example Implicit Dispatcher
//!
//! > This example demonstrates how to use the implicit `dispatcher!` definition syntax enabled by `extras`

use mingling::prelude::*;

// When using implicit syntax, the entry name will be automatically derived
// from the command name (the dispatcher struct is generated internally)
dispatcher!("remote.add" /* => EntryRemoteAdd */);
dispatcher!("remote.remove", EntryRemoteRemove);

fn main() {
    ThisProgram::new().exec_and_exit();
}

gen_program!();