pub enum Command {
Format {
file: Option<PathBuf>,
schema: Option<MtreeSchema>,
output_format: OutputFormat,
pretty: bool,
},
Validate {
file: Option<PathBuf>,
schema: Option<MtreeSchema>,
},
}
Variants§
Format
Read an MTREE file and return it in another file format
Reads and validates an MTREE file according to a schema and outputs it in another file format (currently, only JSON is supported). If the file can be validated, the program exits with the data returned in another file format on stdout 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
schema: Option<MtreeSchema>
Provide the MTREE schema version to use.
If no schema version is provided, it will be deduced from the file itself.
Valid values are [‘1’, ‘2’].
output_format: OutputFormat
Provide the output format
Validate
Validate an MTREE file
Validate an MTREE 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.
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