pub struct PrsArgs {
pub repo: RepoArgs,
pub command: Option<PrsCommand>,
pub format: OutputFormat,
}Expand description
majordomus prs (alias pr). Every subcommand but refresh, drain and cleanup
reads the last recorded forge observation and never reaches the network.
§Example
use majordomus_cli::cli::{Cli, Command, OutputFormat, PrsArgs, PrsCommand};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "pr", "explain", "12", "--format", "json"]).unwrap();
let Command::Prs(args) = cli.command else { panic!("not the prs command") };
let args: PrsArgs = args;
assert!(matches!(args.command, Some(PrsCommand::Explain { number: 12 })));
assert!(matches!(args.format, OutputFormat::Json));Fields§
§repo: RepoArgsWhere the repository is found.
command: Option<PrsCommand>The subcommand; none is status.
format: OutputFormatOutput shape
Trait Implementations§
Source§impl Args for PrsArgs
impl Args for PrsArgs
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 PrsArgs
impl FromArgMatches for PrsArgs
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 PrsArgs
impl RefUnwindSafe for PrsArgs
impl Send for PrsArgs
impl Sync for PrsArgs
impl Unpin for PrsArgs
impl UnsafeUnpin for PrsArgs
impl UnwindSafe for PrsArgs
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