mqrs/src/cli.rs
finga 3572b12a1a Receive message(s) from a queue
This subcommand receives one or more messages from a queue. Three
different methods are supported, read message by message, read until a
given timout or read until a specified date and time. This subcommand
also supports the `--non-blocking` flag.
2021-06-20 16:35:18 +02:00

28 lines
706 B
Rust

use crate::{create::Create, info::Info, recv::Recv, send::Send, unlink::Unlink};
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),
Info(Info),
Unlink(Unlink),
Send(Send),
Recv(Recv),
}