-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathimage.rs
More file actions
33 lines (27 loc) · 749 Bytes
/
image.rs
File metadata and controls
33 lines (27 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use clap::{Args, Subcommand, ValueEnum};
use crate::core::image::ImageSelector;
#[derive(Debug, Args)]
pub struct ImageArguments {
#[command(subcommand)]
pub command: ImageCommand,
}
#[derive(Debug, Subcommand)]
pub enum ImageCommand {
List(ImageListArguments),
}
#[derive(Debug, Args)]
pub struct ImageListArguments {
/// Optionally specify one or more images to display.
pub image: Vec<ImageSelector>,
/// Pretty print the structured output.
#[arg(long, value_enum, default_value_t = Pretty::default())]
pub pretty: Pretty,
}
// #[derive(Clone, Debug, Default, strum::Display, strum::EnumString)]
#[derive(Clone, Debug, Default, ValueEnum)]
pub enum Pretty {
#[default]
Auto,
Always,
Never,
}