pub enum Command {
Validate {
file: Option<PathBuf>,
},
FormatPackages {
file: Option<PathBuf>,
architecture: Architecture,
output_format: OutputFormat,
pretty: bool,
},
Check {
file: Option<PathBuf>,
},
}
Variants§
Validate
Validate a SRCINFO file from a path or stdin
.
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 status.
FormatPackages
Format a SRCINFO file from a path or stdin
Read, validate and print all of the SRCINFO’s packages in their final representation for a specific architecture. If the file is valid, the program prints the data in the requested file format to stdout and returns with an exit status of 0.
Fields
architecture: Architecture
The selected architecture that should be used to interpret the SRCINFO file.
Only [split-]packages that are applicable for this architecture will be returned.
output_format: OutputFormat
Provide the output format
Check
Read a SRCINFO file from a path or stdin
and perform linter checks on it.
This ensures that the SRCINFO file is both valid and adheres to currently known best practices.
Returns with a non-zero exit status as soon as any linting issue is encountered.
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