pub enum MeshSessionCommand {
Open(MeshSessionOpenArgs),
Close(MeshSessionCloseArgs),
}Expand description
The two ends of a session’s life on the mesh: open, which announces a session and
updates what it says about itself, and close, which ends it and with it every claim
it held on every linked runtime. There is no third verb, because everything a session
does between those two ends is a claim, a handover or a review.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshSessionCommand};
let cli = Cli::try_parse_from([
"majordomus", "mesh", "session", "open", "--session", "s1", "--client", "claude-code",
])
.unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Session(session) = mesh.command else { panic!("expected `session`") };
let MeshSessionCommand::Open(open) = session.command else { panic!("expected `open`") };
assert_eq!(open.client.as_deref(), Some("claude-code"));Variants§
Open(MeshSessionOpenArgs)
Open or update a session: what it is, what it does, where
Close(MeshSessionCloseArgs)
Close a session; its claims end with it on every linked runtime
Trait Implementations§
Source§impl Debug for MeshSessionCommand
impl Debug for MeshSessionCommand
Source§impl FromArgMatches for MeshSessionCommand
impl FromArgMatches for MeshSessionCommand
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 MeshSessionCommand
impl Subcommand for MeshSessionCommand
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 MeshSessionCommand
impl RefUnwindSafe for MeshSessionCommand
impl Send for MeshSessionCommand
impl Sync for MeshSessionCommand
impl Unpin for MeshSessionCommand
impl UnsafeUnpin for MeshSessionCommand
impl UnwindSafe for MeshSessionCommand
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