Skip to main content

release_kit/cli/
read.rs

1//! Shared argument shape for the read-only payload commands.
2
3use clap::Args;
4
5/// Read one payload entry, or list the valid names.
6///
7/// The group makes the either-or explicit to clap, so `rk method` with
8/// neither is refused at parse time and `rk usage` can render the
9/// alternative in its example.
10#[derive(Debug, Args)]
11#[group(id = "selection", required = true, multiple = true)]
12pub struct ReadArgs {
13    /// The entry to print; omit it and pass --list to see the names.
14    pub name: Option<String>,
15
16    /// List the valid names instead of printing an entry.
17    #[arg(long)]
18    pub list: bool,
19}