mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-09 05:39:09 -07:00
cli + query: improvements
This commit is contained in:
@@ -5,14 +5,19 @@ use crate::{Format, Index};
|
||||
|
||||
#[derive(Debug, Deserialize, Parser)]
|
||||
pub struct Params {
|
||||
#[clap(short, long, value_parser = PossibleValuesParser::new(Index::ids()))]
|
||||
#[clap(short, long, value_parser = PossibleValuesParser::new(Index::possible_values()))]
|
||||
/// Index of the values requested
|
||||
pub index: String,
|
||||
#[clap(short, long, value_delimiter = ' ', num_args = 1..)]
|
||||
/// Names of the values requested
|
||||
pub values: Vec<String>,
|
||||
#[clap(short, long, allow_hyphen_values = true)]
|
||||
/// Inclusive starting index, if negative will be from the end
|
||||
pub from: Option<i64>,
|
||||
#[clap(short, long, allow_hyphen_values = true)]
|
||||
/// Inclusive ending index, if negative will be from the end
|
||||
pub to: Option<i64>,
|
||||
#[clap(long)]
|
||||
/// Format of the output
|
||||
pub format: Option<Format>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user