pub struct BriefArgs {
pub repo: RepoArgs,
pub line: bool,
pub keep_awake: bool,
pub session: Option<String>,
pub this_checkout: bool,
pub format: OutputFormat,
}Expand description
majordomus brief: the brief.session capability on the command line (ADR 0136).
§Example
use majordomus_cli::cli::{BriefArgs, Cli, Command, OutputFormat};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "brief", "--line", "--session", "abc"]).unwrap();
let Command::Brief(args) = cli.command else { panic!("not the brief command") };
let args: BriefArgs = args;
assert!(args.line && !args.keep_awake && !args.this_checkout);
assert_eq!(args.session.as_deref(), Some("abc"));
assert!(matches!(args.format, OutputFormat::Text));Fields§
§repo: RepoArgsWhere and how the repository is read.
line: boolPrint the one-line brief alone: the status line’s text
keep_awake: boolPrint what a session is told at its start about keeping itself awake, then the one-line brief
session: Option<String>The provider’s own session identity: the brief names the open episode it owns
this_checkout: boolRead this checkout’s board alone instead of every checkout’s
format: OutputFormatOutput shape
Trait Implementations§
Source§impl Args for BriefArgs
impl Args for BriefArgs
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 BriefArgs
impl FromArgMatches for BriefArgs
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 BriefArgs
impl RefUnwindSafe for BriefArgs
impl Send for BriefArgs
impl Sync for BriefArgs
impl Unpin for BriefArgs
impl UnsafeUnpin for BriefArgs
impl UnwindSafe for BriefArgs
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