pub struct MeshReviewArgs {
pub command: MeshReviewCommand,
}Expand description
mesh review: the group that carries a review across runtimes, so that a worker can
have its branch read by a worker it cannot otherwise address. Asking and answering are
separate acts by separate runtimes, which is why they are separate subcommands and the
group itself runs nothing.
use clap::Parser;
use majordomus_cli::cli::{Cli, Command, MeshCommand, MeshReviewArgs, MeshReviewCommand};
let cli = Cli::try_parse_from([
"majordomus", "mesh", "review", "request", "feature/x", "--session", "s1",
])
.unwrap();
let Command::Mesh(mesh) = cli.command else { panic!("expected `mesh`") };
let MeshCommand::Review(review) = mesh.command else { panic!("expected `review`") };
let review: MeshReviewArgs = review;
assert!(matches!(review.command, MeshReviewCommand::Request(_)));
// the group has no behaviour of its own
assert!(Cli::try_parse_from(["majordomus", "mesh", "review"]).is_err());Fields§
§command: MeshReviewCommandrequest or answer.
Trait Implementations§
Source§impl Args for MeshReviewArgs
impl Args for MeshReviewArgs
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 MeshReviewArgs
impl Debug for MeshReviewArgs
Source§impl FromArgMatches for MeshReviewArgs
impl FromArgMatches for MeshReviewArgs
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 MeshReviewArgs
impl RefUnwindSafe for MeshReviewArgs
impl Send for MeshReviewArgs
impl Sync for MeshReviewArgs
impl Unpin for MeshReviewArgs
impl UnsafeUnpin for MeshReviewArgs
impl UnwindSafe for MeshReviewArgs
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