pub struct EconomicsArgs {
pub command: EconomicsCommand,
}Expand description
majordomus economics. A group with no action of its own: a subcommand is required,
and each one is either the command line of an economics.* capability or one of the
three producers of evidence that cli::local classifies as command-line-only.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, EconomicsArgs, EconomicsCommand};
let cli = Cli::try_parse_from(["majordomus", "economics", "check"]).unwrap();
let args: EconomicsArgs = match cli.command {
Command::Economics(args) => args,
other => panic!("expected `economics`, parsed {other:?}"),
};
assert!(matches!(args.command, EconomicsCommand::Check(_)));
// naming no subcommand is a usage error, never a default that reads or spends
assert!(Cli::try_parse_from(["majordomus", "economics"]).is_err());Fields§
§command: EconomicsCommandsummary, explain, runs, check, measure, run, references.
Trait Implementations§
Source§impl Args for EconomicsArgs
impl Args for EconomicsArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Debug for EconomicsArgs
impl Debug for EconomicsArgs
Source§impl FromArgMatches for EconomicsArgs
impl FromArgMatches for EconomicsArgs
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>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for EconomicsArgs
impl RefUnwindSafe for EconomicsArgs
impl Send for EconomicsArgs
impl Sync for EconomicsArgs
impl Unpin for EconomicsArgs
impl UnsafeUnpin for EconomicsArgs
impl UnwindSafe for EconomicsArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more