pub struct ShellArgs {
pub repo: RepoArgs,
pub command: ShellCommand,
pub format: OutputFormat,
}Expand description
majordomus shell. The output shape is global, so it reads the way a person writes it.
§Example
use majordomus_cli::cli::{Cli, Command, OutputFormat, ShellArgs};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "shell", "check", "--format", "json"]).unwrap();
let Command::Shell(args) = cli.command else { panic!("not the shell command") };
let args: ShellArgs = args;
assert!(matches!(args.format, OutputFormat::Json));Fields§
§repo: RepoArgsWhere and how the repository is read.
command: ShellCommandcheck. Required: the group runs nothing of its own.
format: OutputFormatOutput shape
Trait Implementations§
Source§impl Args for ShellArgs
impl Args for ShellArgs
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 FromArgMatches for ShellArgs
impl FromArgMatches for ShellArgs
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 ShellArgs
impl RefUnwindSafe for ShellArgs
impl Send for ShellArgs
impl Sync for ShellArgs
impl Unpin for ShellArgs
impl UnsafeUnpin for ShellArgs
impl UnwindSafe for ShellArgs
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