pub struct DeliveryArgs {
pub repo: RepoArgs,
pub command: DeliveryCommand,
pub format: OutputFormat,
}Expand description
majordomus delivery: every product feature against the delivery invariant. The output
shape is global, so it reads the way a person writes it — delivery report --format json.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, DeliveryArgs, DeliveryCommand, OutputFormat};
let cli = Cli::try_parse_from(["majordomus", "delivery", "report", "--check", "--format", "json"])
.unwrap();
let args: DeliveryArgs = match cli.command {
Command::Delivery(args) => args,
other => panic!("expected `delivery`, parsed {other:?}"),
};
assert!(matches!(args.format, OutputFormat::Json));
assert!(matches!(args.command, DeliveryCommand::Report { check: true }));
// the group runs nothing of its own: every runnable path here is a capability's
assert!(Cli::try_parse_from(["majordomus", "delivery"]).is_err());Fields§
§repo: RepoArgsWhere and how the repository is read.
command: DeliveryCommandreport or show. Required: the group runs nothing of its own.
format: OutputFormatOutput shape
Trait Implementations§
Source§impl Args for DeliveryArgs
impl Args for DeliveryArgs
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 DeliveryArgs
impl Debug for DeliveryArgs
Source§impl FromArgMatches for DeliveryArgs
impl FromArgMatches for DeliveryArgs
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 DeliveryArgs
impl RefUnwindSafe for DeliveryArgs
impl Send for DeliveryArgs
impl Sync for DeliveryArgs
impl Unpin for DeliveryArgs
impl UnsafeUnpin for DeliveryArgs
impl UnwindSafe for DeliveryArgs
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