mqrs/src/cli.rs
finga fdacba1eec Create a message queue
The create command creates a new message queue with support of the
typical parameters `mode`, `capacity` and `msgsize`. This command also
supports the global argument `verbose`.
2021-06-14 23:01:14 +02:00

24 lines
584 B
Rust

use crate::create::Create;
use clap::{crate_authors, crate_version, AppSettings, Clap};
#[derive(Clap, Debug)]
#[clap(
version = crate_version!(),
author = crate_authors!(", "),
setting = AppSettings::SubcommandRequiredElseHelp,
global_setting = AppSettings::VersionlessSubcommands,
global_setting = AppSettings::InferSubcommands,
)]
pub struct Opts {
/// Produce verbose output
#[clap(short, long, global = true)]
pub verbose: bool,
#[clap(subcommand)]
pub command: Command,
}
#[derive(Clap, Debug)]
pub enum Command {
Create(Create),
}