Macro moto::choice

source ·
macro_rules! choice {
    ($name:expr,$description:expr,$action:expr,$matches_if:expr) => { ... };
    ($name:expr,$description:expr,$action:expr) => { ... };
    ($name:expr,$action:expr) => { ... };
}
Expand description

§choice! macro

a macro to create choice easily e.g. choice!(“name”,“description”,|args| println!(“hello”),|args| args.len() == 1) or choice!(“name”,“description”,|args| println!(“hello”)) if you dont need to match the args or choice!(“name”,|args| println!(“hello”)) if you dont have a description