studiole-command 0.4.1

A simple command execution framework with event subscription and progress tracking.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(not(feature = "server"))]
#[macro_export]
macro_rules! define_commands {
    ($($kind:ident($req:ty)),* $(,)?) => {
        define_commands_web!($($kind($req)),*);
    };
}

#[cfg(feature = "server")]
#[macro_export]
macro_rules! define_commands {
    ($($kind:ident($req:ty, $handler:ty)),* $(,)?) => {
        define_commands_web!($($kind($req)),*);
        define_commands_server!($($kind($req, $handler)),*);
    };
}