Macro fred::cmd

source ·
macro_rules! cmd {
    ($name:expr) => { ... };
    ($name:expr, blocking: $blk:expr) => { ... };
    ($name:expr, hash: $hash:expr) => { ... };
    ($name:expr, hash: $hash:expr, blocking: $blk:expr) => { ... };
}
Expand description

Shorthand to create a CustomCommand.

let _cmd = cmd!("FOO.BAR");
let _cmd = cmd!("FOO.BAR", blocking: true);
let _cmd = cmd!("FOO.BAR", hash: ClusterHash::FirstKey);
let _cmd = cmd!("FOO.BAR", hash: ClusterHash::FirstKey, blocking: true);
// which is shorthand for
let _cmd = CustomCommand::new("FOO.BAR", ClusterHash::FirstKey, true);