pub enum Command {
Create {
command: CreateCommand,
},
Validate {
file: Option<PathBuf>,
},
Format {
file: Option<PathBuf>,
output_format: OutputFormat,
pretty: bool,
},
}
Variants§
Create
Create a PKGINFO file according to a schema
If the input can be validated according to the schema, the program writes a valid PKGINFO file and exits with no output and a return code of 0. If the input can not be validated according to the schema, an error is emitted on stderr and the program exits with a non-zero exit code.
Fields
command: CreateCommand
Validate
Validate a PKGINFO file
Validate a PKGINFO file according to a schema. If the file can be validated, the program exits with no output and a return code of 0. If the file can not be validated, an error is emitted on stderr and the program exits with a non-zero exit code.
Fields
Format
Parse a PKGINFO file and output it in a different file format
If the input can be validated according to a known schema, the program writes the PKGINFO data to stdout in a different file format (optionally, a file path to write to may be provided) and exits with a return code of 0. Currently only JSON is supported as output format. If the input can not be validated according to a known schema, an error is emitted on stderr and the program exits with a non-zero exit code.
Fields
file: Option<PathBuf>
An optional input file path to read from
If no file path is specified, stdin is read from and expected to contain PKGINFO data to format.
output_format: OutputFormat
The output format to use
Currently only “json” (the default) is supported
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command
] so it can instantiate self
via
[FromArgMatches::update_from_arg_matches_mut
] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommand