pub struct IntentArgs {
pub repo: RepoArgs,
pub command: IntentCommand,
pub format: OutputFormat,
}Expand description
majordomus intent. The output shape is global, so it reads where a person writes it.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, IntentArgs, IntentCommand};
let cli = Cli::try_parse_from(["majordomus", "intent", "preflight", "--issue", "I0001"]).unwrap();
let Command::Intent(args) = cli.command else { panic!("intent") };
let args: IntentArgs = args;
assert!(matches!(args.command, IntentCommand::Preflight { issue: Some(_), .. }));
// the group runs nothing of its own: every runnable path here is a capability's
assert!(Cli::try_parse_from(["majordomus", "intent"]).is_err());Fields§
§repo: RepoArgsWhere and how the repository is read.
command: IntentCommandlist, show, validate, coverage, preflight, binding, realization,
explain or propose.
format: OutputFormatOutput shape
Trait Implementations§
Source§impl Args for IntentArgs
impl Args for IntentArgs
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 IntentArgs
impl Debug for IntentArgs
Source§impl FromArgMatches for IntentArgs
impl FromArgMatches for IntentArgs
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 IntentArgs
impl RefUnwindSafe for IntentArgs
impl Send for IntentArgs
impl Sync for IntentArgs
impl Unpin for IntentArgs
impl UnsafeUnpin for IntentArgs
impl UnwindSafe for IntentArgs
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