pub enum MeshHandoverCommand {
Publish(MeshHandoverPublishArgs),
Consume(MeshHandoverConsumeArgs),
}Expand description
The two halves of moving continuity across the mesh: publish offers this checkout’s
handover to every linked runtime, and consume takes one another runtime offered and
writes it where handover --resolve will find it. Publishing does not choose a reader
and consuming does not ask the publisher, so neither side has to be running when the
other acts.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshHandoverCommand};
let cli = Cli::try_parse_from([
"majordomus", "mesh", "handover", "consume", "h-7", "--session", "s1",
])
.unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Handover(handover) = mesh.command else { panic!("expected `handover`") };
let MeshHandoverCommand::Consume(consume) = handover.command else { panic!("expected it") };
assert_eq!(consume.handover, "h-7");Variants§
Publish(MeshHandoverPublishArgs)
Publish this checkout’s newest handover record (or the one named) to every linked runtime
Consume(MeshHandoverConsumeArgs)
Consume a handover another runtime published, writing it as a local record handover --resolve finds
Trait Implementations§
Source§impl Debug for MeshHandoverCommand
impl Debug for MeshHandoverCommand
Source§impl FromArgMatches for MeshHandoverCommand
impl FromArgMatches for MeshHandoverCommand
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Subcommand for MeshHandoverCommand
impl Subcommand for MeshHandoverCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for MeshHandoverCommand
impl RefUnwindSafe for MeshHandoverCommand
impl Send for MeshHandoverCommand
impl Sync for MeshHandoverCommand
impl Unpin for MeshHandoverCommand
impl UnsafeUnpin for MeshHandoverCommand
impl UnwindSafe for MeshHandoverCommand
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