pub struct MeshHandoverPublishArgs {
pub path: Option<String>,
pub issue: Option<String>,
pub milestone: Option<String>,
pub query: MeshQueryArgs,
}Expand description
mesh handover publish: which record to offer, and what it belongs to. Every flag is
optional because the useful default is the newest handover this checkout wrote — the
one a worker has just finished — and --path exists for the case where that is not the
one meant. The issue and milestone travel with the record so that a runtime receiving
it can file it without reading it.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshHandoverCommand,
MeshHandoverPublishArgs};
let cli = Cli::try_parse_from([
"majordomus", "mesh", "handover", "publish", "--issue", "I1703",
])
.unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Handover(handover) = mesh.command else { panic!("expected `handover`") };
let MeshHandoverCommand::Publish(publish) = handover.command else { panic!("expected it") };
let publish: MeshHandoverPublishArgs = publish;
assert_eq!(publish.issue.as_deref(), Some("I1703"));
assert_eq!(publish.path, None, "no path means the newest record this checkout wrote");Fields§
§path: Option<String>The record, relative to the repository root, under .ai/local/state/handovers/
issue: Option<String>The issue the handover belongs to
milestone: Option<String>The milestone it belongs to
query: MeshQueryArgsWhere the repository is and how to answer.
Trait Implementations§
Source§impl Args for MeshHandoverPublishArgs
impl Args for MeshHandoverPublishArgs
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 MeshHandoverPublishArgs
impl Debug for MeshHandoverPublishArgs
Source§impl FromArgMatches for MeshHandoverPublishArgs
impl FromArgMatches for MeshHandoverPublishArgs
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 MeshHandoverPublishArgs
impl RefUnwindSafe for MeshHandoverPublishArgs
impl Send for MeshHandoverPublishArgs
impl Sync for MeshHandoverPublishArgs
impl Unpin for MeshHandoverPublishArgs
impl UnsafeUnpin for MeshHandoverPublishArgs
impl UnwindSafe for MeshHandoverPublishArgs
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