pub struct MeshHandoverArgs {
pub command: MeshHandoverCommand,
}Expand description
mesh handover: the group that moves a handover record between runtimes. Continuity
between two workers of one repository is otherwise a file one of them cannot see, and
the two verbs here are the two halves of that move; the group runs neither by itself.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshHandoverArgs, MeshHandoverCommand};
let cli = Cli::try_parse_from(["majordomus", "mesh", "handover", "publish"]).unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Handover(handover) = mesh.command else { panic!("expected `handover`") };
let handover: MeshHandoverArgs = handover;
assert!(matches!(handover.command, MeshHandoverCommand::Publish(_)));
// the group has no behaviour of its own
assert!(Cli::try_parse_from(["majordomus", "mesh", "handover"]).is_err());Fields§
§command: MeshHandoverCommandpublish or consume.
Trait Implementations§
Source§impl Args for MeshHandoverArgs
impl Args for MeshHandoverArgs
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 MeshHandoverArgs
impl Debug for MeshHandoverArgs
Source§impl FromArgMatches for MeshHandoverArgs
impl FromArgMatches for MeshHandoverArgs
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 MeshHandoverArgs
impl RefUnwindSafe for MeshHandoverArgs
impl Send for MeshHandoverArgs
impl Sync for MeshHandoverArgs
impl Unpin for MeshHandoverArgs
impl UnsafeUnpin for MeshHandoverArgs
impl UnwindSafe for MeshHandoverArgs
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