#[macro_export]
macro_rules! reply {
($cmd: ident, $fmt: literal$(, $($arg:expr),* $(,)?)?) => {
{
let msg = format!($fmt$(, $($arg),*)?);
$cmd.reply(msg);
}
};
}
#[macro_export]
macro_rules! reply_ok {
($cmd: ident, $fmt: literal$(, $($arg:expr),* $(,)?)?) => {
{
let msg = format!($fmt$(, $($arg),*)?);
$cmd.reply_ok(msg);
}
};
}
#[macro_export]
macro_rules! reply_failed {
($cmd: ident, $fmt: literal$(, $($arg:expr),* $(,)?)?) => {
{
let msg = format!($fmt$(, $($arg),*)?);
$cmd.reply_failed(msg);
}
};
}