pub struct ReasoningArgs {
pub repo: RepoArgs,
pub command: ReasoningCommand,
pub format: OutputFormat,
}Expand description
majordomus reasoning: the command-line projection of the reasoning capabilities.
The repository arguments and the output shape are shared by every subcommand, and the
shape is global, so --format reads the same before or after the subcommand.
§Example
use majordomus_cli::cli::{Cli, Command, OutputFormat, ReasoningArgs, ReasoningCommand};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "reasoning", "plan", "--materiality", "high", "--format", "json"]).unwrap();
let Command::Reasoning(args) = cli.command else { panic!("not the reasoning command") };
let args: ReasoningArgs = args;
assert!(matches!(args.command, ReasoningCommand::Plan { .. }));
assert!(matches!(args.format, OutputFormat::Json));Fields§
§repo: RepoArgsWhere and how the repository is read.
command: ReasoningCommandadvisors, plan, record, status, explain, check.
format: OutputFormattext for a person, json for a machine; both render the same answer.
Trait Implementations§
Source§impl Args for ReasoningArgs
impl Args for ReasoningArgs
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 ReasoningArgs
impl Debug for ReasoningArgs
Source§impl FromArgMatches for ReasoningArgs
impl FromArgMatches for ReasoningArgs
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 ReasoningArgs
impl RefUnwindSafe for ReasoningArgs
impl Send for ReasoningArgs
impl Sync for ReasoningArgs
impl Unpin for ReasoningArgs
impl UnsafeUnpin for ReasoningArgs
impl UnwindSafe for ReasoningArgs
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