macro_rules! plugin { (|$args:tt, $ports:tt, $shutdown:tt, $plugins:tt $(,)?| $code:block ) => { ... }; }
Create a Plugin.
Plugin
use ctl::*; let mut config = RunConfig::new(); config.add_plugin( "wait", plugin!(|args, _, shutdown, _| { if let Err(r) = check_no_arguments(&args) { return r; } shutdown.wait().await; PluginResponse::ok_empty() }) );